mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Last test for 100% coverage of mqtt light
This commit is contained in:
parent
7bb07cdc03
commit
1c08923ffc
@ -62,6 +62,15 @@ class TestLightMQTT(unittest.TestCase):
|
|||||||
""" Stop down stuff we started. """
|
""" Stop down stuff we started. """
|
||||||
self.hass.stop()
|
self.hass.stop()
|
||||||
|
|
||||||
|
def test_fail_setup_if_no_command_topic(self):
|
||||||
|
self.assertTrue(light.setup(self.hass, {
|
||||||
|
'light': {
|
||||||
|
'platform': 'mqtt',
|
||||||
|
'name': 'test',
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
self.assertIsNone(self.hass.states.get('light.test'))
|
||||||
|
|
||||||
def test_no_color_or_brightness_if_no_topics(self):
|
def test_no_color_or_brightness_if_no_topics(self):
|
||||||
self.assertTrue(light.setup(self.hass, {
|
self.assertTrue(light.setup(self.hass, {
|
||||||
'light': {
|
'light': {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user