Continue on invalid platforms and new setup_component unit tests (#3736)

This commit is contained in:
Johann Kellerman authored and Paulus Schoutsen committed 2016-10-08 11:27:35 -07:00
1 parent 1b26b5ad14
commit 7b40a641ec
23 files changed
+842 -672

No files matched your search

+11 -10
View File
@@ -5,7 +5,7 @@ from homeassistant.bootstrap import setup_component
import homeassistant.components.notify as notify
from homeassistant.components.notify import group
from tests.common import get_test_home_assistant
from tests.common import assert_setup_component, get_test_home_assistant
class TestNotifyGroup(unittest.TestCase):
@@ -15,15 +15,16 @@ class TestNotifyGroup(unittest.TestCase):
"""Setup things to be run when tests are started."""
self.hass = get_test_home_assistant()
self.events = []
self.assertTrue(setup_component(self.hass, notify.DOMAIN, {
'notify': [{
'name': 'demo1',
'platform': 'demo'
}, {
'name': 'demo2',
'platform': 'demo'
}]
}))
with assert_setup_component(2):
setup_component(self.hass, notify.DOMAIN, {
'notify': [{
'name': 'demo1',
'platform': 'demo'
}, {
'name': 'demo2',
'platform': 'demo'
}]
})
self.service = group.get_service(self.hass, {'services': [
{'service': 'demo1'},