Add persistent notifications to bootstrap (#3738)

* Add persistent notifications to bootstrap

* Rebase, Fix test
This commit is contained in:
Johann Kellerman authored and Paulus Schoutsen committed 2016-10-13 09:09:07 -07:00
1 parent 39a446c43c
commit cb322f72db
4 files changed
+36 -15

No files matched your search

+9 -7
View File
@@ -74,13 +74,15 @@ class TestCheckConfig(unittest.TestCase):
with patch_yaml_files(files):
res = check_config.check(get_test_config_dir('component.yaml'))
change_yaml_files(res)
self.assertDictEqual({
'components': {},
'except': {'http': {'password': 'err123'}},
'secret_cache': {},
'secrets': {},
'yaml_files': ['.../component.yaml']
}, res)
self.assertDictEqual({}, res['components'])
self.assertDictEqual(
{'http': {'password': 'err123'}},
res['except']
)
self.assertDictEqual({}, res['secret_cache'])
self.assertDictEqual({}, res['secrets'])
self.assertListEqual(['.../component.yaml'], res['yaml_files'])
files = {
'platform.yaml': (BASE_CONFIG + 'mqtt:\n\n'
+2 -1
View File
@@ -269,11 +269,12 @@ class TestBootstrap:
def test_home_assistant_core_config_validation(self):
"""Test if we pass in wrong information for HA conf."""
# Extensive HA conf validation testing is done in test_config.py
hass = get_test_home_assistant()
assert None is bootstrap.from_config_dict({
'homeassistant': {
'latitude': 'some string'
}
})
}, hass=hass)
def test_component_setup_with_validation_and_dependency(self):
"""Test all config is passed to dependencies."""