mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix check_config script. (#5853)
This commit is contained in:
parent
8785e5826e
commit
4e8d20328a
@ -33,6 +33,7 @@ MOCKS = {
|
|||||||
}
|
}
|
||||||
SILENCE = (
|
SILENCE = (
|
||||||
'homeassistant.bootstrap.clear_secret_cache',
|
'homeassistant.bootstrap.clear_secret_cache',
|
||||||
|
'homeassistant.bootstrap.async_register_signal_handling',
|
||||||
'homeassistant.core._LOGGER.info',
|
'homeassistant.core._LOGGER.info',
|
||||||
'homeassistant.loader._LOGGER.info',
|
'homeassistant.loader._LOGGER.info',
|
||||||
'homeassistant.bootstrap._LOGGER.info',
|
'homeassistant.bootstrap._LOGGER.info',
|
||||||
|
@ -58,7 +58,7 @@ class TestBootstrap:
|
|||||||
autospec=True)
|
autospec=True)
|
||||||
@mock.patch('homeassistant.util.location.detect_location_info',
|
@mock.patch('homeassistant.util.location.detect_location_info',
|
||||||
autospec=True, return_value=None)
|
autospec=True, return_value=None)
|
||||||
@mock.patch('homeassistant.helpers.signal.async_register_signal_handling')
|
@mock.patch('homeassistant.bootstrap.async_register_signal_handling')
|
||||||
def test_from_config_file(self, mock_upgrade, mock_detect, mock_signal):
|
def test_from_config_file(self, mock_upgrade, mock_detect, mock_signal):
|
||||||
"""Test with configuration file."""
|
"""Test with configuration file."""
|
||||||
components = set(['browser', 'conversation', 'script'])
|
components = set(['browser', 'conversation', 'script'])
|
||||||
@ -290,7 +290,7 @@ class TestBootstrap:
|
|||||||
assert 'comp' not in self.hass.config.components
|
assert 'comp' not in self.hass.config.components
|
||||||
|
|
||||||
@mock.patch('homeassistant.bootstrap.enable_logging')
|
@mock.patch('homeassistant.bootstrap.enable_logging')
|
||||||
@mock.patch('homeassistant.helpers.signal.async_register_signal_handling')
|
@mock.patch('homeassistant.bootstrap.async_register_signal_handling')
|
||||||
def test_home_assistant_core_config_validation(self, log_mock, sig_mock):
|
def test_home_assistant_core_config_validation(self, log_mock, sig_mock):
|
||||||
"""Test if we pass in wrong information for HA conf."""
|
"""Test if we pass in wrong information for HA conf."""
|
||||||
# Extensive HA conf validation testing is done in test_config.py
|
# Extensive HA conf validation testing is done in test_config.py
|
||||||
|
Loading…
x
Reference in New Issue
Block a user