1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-27 14:31:13 +00:00

Fix bootstrap circular imports (#4108)

* Fix bootstrap circular imports

* fix test

* Lint
This commit is contained in:
Paulus Schoutsen
2016-10-29 12:54:47 -07:00
committed by GitHub
parent 08a65a3b31
commit 9ea1101aba
5 changed files with 140 additions and 62 deletions

View File

@@ -348,6 +348,16 @@ def patch_yaml_files(files_dict, endswith=True):
return patch.object(yaml, 'open', mock_open_f, create=True)
def mock_coro(return_value=None):
"""Helper method to return a coro that returns a value."""
@asyncio.coroutine
def coro():
"""Fake coroutine."""
return return_value
return coro
@contextmanager
def assert_setup_component(count, domain=None):
"""Collect valid configuration from setup_component.