Bugfix async log handler (#4954)

* Bugfix async log handler

* fix boostrap test

* Use hass.data for store handler and cleanup on async_stop

* Update bootstrap.py
This commit is contained in:
Pascal Vizeli 2016-12-17 21:21:52 +01:00 committed by Paulus Schoutsen
parent b08b376aa7
commit 50c8224365
5 changed files with 23 additions and 9 deletions

View file

@ -70,6 +70,8 @@ class TestBootstrap:
with mock.patch('os.path.isfile', mock.Mock(return_value=True)), \
mock.patch('os.access', mock.Mock(return_value=True)), \
mock.patch('homeassistant.bootstrap.enable_logging',
mock.Mock(return_value=True)), \
patch_yaml_files(files, True):
self.hass = bootstrap.from_config_file('config.yaml')
@ -286,7 +288,8 @@ class TestBootstrap:
assert not bootstrap.setup_component(self.hass, 'comp', {})
assert 'comp' not in self.hass.config.components
def test_home_assistant_core_config_validation(self):
@mock.patch('homeassistant.bootstrap.enable_logging')
def test_home_assistant_core_config_validation(self, log_mock):
"""Test if we pass in wrong information for HA conf."""
# Extensive HA conf validation testing is done in test_config.py
assert None is bootstrap.from_config_dict({