Core cleanup: two stage shutdown (#5876)

* Core cleanup: two stage shutdown

* fix spell

* fix

* add async logger to close

* change aiohttp to use CLOSE

* address paulus comments

* Fix tests

* Add unittest
This commit is contained in:
Pascal Vizeli 2017-02-13 06:24:07 +01:00 committed by GitHub
parent 4623d1071e
commit 41849eab06
8 changed files with 97 additions and 107 deletions

View file

@ -71,7 +71,7 @@ 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.patch('homeassistant.bootstrap.async_enable_logging',
mock.Mock(return_value=True)), \
patch_yaml_files(files, True):
self.hass = bootstrap.from_config_file('config.yaml')
@ -289,7 +289,7 @@ class TestBootstrap:
assert not bootstrap.setup_component(self.hass, 'comp', {})
assert 'comp' not in self.hass.config.components
@mock.patch('homeassistant.bootstrap.enable_logging')
@mock.patch('homeassistant.bootstrap.async_enable_logging')
@mock.patch('homeassistant.bootstrap.async_register_signal_handling')
def test_home_assistant_core_config_validation(self, log_mock, sig_mock):
"""Test if we pass in wrong information for HA conf."""