mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Check config before restarting (#5609)
* Check config before restarting. * Make check_config on restart async * don't check if notification service exists * Use .communicate() * Reduce the number of notifications. Add tests.
This commit is contained in:
committed by
Paulus Schoutsen
parent
51810620fb
commit
f774538e66
@@ -388,6 +388,11 @@ def mock_coro(return_value=None):
|
||||
return coro
|
||||
|
||||
|
||||
def mock_generator(return_value=None):
|
||||
"""Helper method to return a coro generator that returns a value."""
|
||||
return mock_coro(return_value)()
|
||||
|
||||
|
||||
@contextmanager
|
||||
def assert_setup_component(count, domain=None):
|
||||
"""Collect valid configuration from setup_component.
|
||||
|
||||
Reference in New Issue
Block a user