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

Hue tweak registered device type + discovery exception (#25977)

* Include location name in create user

* Guard against no host in context

* Fix tests and typing
This commit is contained in:
Paulus Schoutsen
2019-08-16 16:19:00 -07:00
committed by GitHub
parent 6c292846be
commit 57ef721d5d
6 changed files with 18 additions and 9 deletions

View File

@@ -80,6 +80,7 @@ async def test_discovery_single_instance(hass, discovery_flow_conf, source):
"""Test we not allow duplicates."""
flow = config_entries.HANDLERS["test"]()
flow.hass = hass
flow.context = {}
MockConfigEntry(domain="test").add_to_hass(hass)
result = await getattr(flow, "async_step_{}".format(source))({})
@@ -93,6 +94,7 @@ async def test_discovery_confirmation(hass, discovery_flow_conf, source):
"""Test we ask for confirmation via discovery."""
flow = config_entries.HANDLERS["test"]()
flow.hass = hass
flow.context = {}
result = await getattr(flow, "async_step_{}".format(source))({})