Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load dependencies from manifests. Fallback to current DEPENDENCIES. #22716

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
Fix tests
awarecan committed Apr 9, 2019

Verified

This commit was signed with the committer’s verified signature.
michaelsproul Michael Sproul
commit 94fae3f79b5d7bc0db4c22c4fce925d61b160331
10 changes: 6 additions & 4 deletions tests/common.py
Original file line number Diff line number Diff line change
@@ -696,13 +696,15 @@ def assert_setup_component(count, domain=None):
config = {}

@ha.callback
def mock_psc(hass, config_input, domain):
def mock_psc(hass, config_input, domain_input):
"""Mock the prepare_setup_component to capture config."""
res = async_process_component_config(
hass, config_input, domain)
config[domain] = None if res is None else res.get(domain)
hass, config_input, domain_input)
config[domain_input] = None if res is None else res.get(domain_input)
_LOGGER.debug("Configuration for %s, Validated: %s, Original %s",
domain, config[domain], config_input.get(domain))
domain_input,
config[domain_input],
config_input.get(domain_input))
return res

assert isinstance(config, dict)
2 changes: 1 addition & 1 deletion tests/test_config_entries.py
Original file line number Diff line number Diff line change
@@ -162,7 +162,7 @@ async def test_remove_entry(hass, manager):
"""Test that we can remove an entry."""
async def mock_setup_entry(hass, entry):
"""Mock setting up entry."""
hass.loop.create_task(hass.config_entries.async_forward_entry_setup(
hass.async_create_task(hass.config_entries.async_forward_entry_setup(
entry, 'light'))
return True