Fix bootstrap circular imports (#4108)

* Fix bootstrap circular imports

* fix test

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

No files matched your search

+10
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.