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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user