Last test for 100% coverage of mqtt light
This commit is contained in:
parent
7bb07cdc03
commit
1c08923ffc
1 changed files with 9 additions and 0 deletions
|
@ -62,6 +62,15 @@ class TestLightMQTT(unittest.TestCase):
|
|||
""" Stop down stuff we started. """
|
||||
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):
|
||||
self.assertTrue(light.setup(self.hass, {
|
||||
'light': {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue