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:
andrey-git
2017-02-07 11:19:08 +02:00
committed by Paulus Schoutsen
parent 51810620fb
commit f774538e66
4 changed files with 73 additions and 5 deletions

View File

@@ -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.