Fix missing patching of homekit matchers in zeroconf tests (#70141)

pull/70158/head
J. Nick Koston 2022-04-16 04:41:10 -10:00 committed by GitHub
parent cac0e935a8
commit ad1241a116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 4 deletions

View File

@ -504,7 +504,7 @@ async def test_homekit_match_partial_space(hass, mock_async_zeroconf):
zc_gen.ZEROCONF,
{"_hap._tcp.local.": [{"domain": "homekit_controller"}]},
clear=True,
), patch.object(
), patch.dict(zc_gen.HOMEKIT, {"LIFX": "lifx"}, clear=True,), patch.object(
hass.config_entries.flow, "async_init"
) as mock_config_flow, patch.object(
zeroconf,
@ -531,6 +531,10 @@ async def test_homekit_match_partial_dash(hass, mock_async_zeroconf):
zc_gen.ZEROCONF,
{"_hap._udp.local.": [{"domain": "homekit_controller"}]},
clear=True,
), patch.dict(
zc_gen.HOMEKIT,
{"Smart Bridge": "lutron_caseta"},
clear=True,
), patch.object(
hass.config_entries.flow, "async_init"
) as mock_config_flow, patch.object(
@ -558,7 +562,7 @@ async def test_homekit_match_partial_fnmatch(hass, mock_async_zeroconf):
zc_gen.ZEROCONF,
{"_hap._tcp.local.": [{"domain": "homekit_controller"}]},
clear=True,
), patch.dict(zc_gen.HOMEKIT, {"YLDP*": "yeelight"}, clear=True,), patch.object(
), patch.dict(zc_gen.HOMEKIT, {"YLDP*": "yeelight"}, clear=True), patch.object(
hass.config_entries.flow, "async_init"
) as mock_config_flow, patch.object(
zeroconf,
@ -585,7 +589,7 @@ async def test_homekit_match_full(hass, mock_async_zeroconf):
zc_gen.ZEROCONF,
{"_hap._udp.local.": [{"domain": "homekit_controller"}]},
clear=True,
), patch.object(
), patch.dict(zc_gen.HOMEKIT, {"BSB002": "hue"}, clear=True,), patch.object(
hass.config_entries.flow, "async_init"
) as mock_config_flow, patch.object(
zeroconf,
@ -612,6 +616,10 @@ async def test_homekit_already_paired(hass, mock_async_zeroconf):
zc_gen.ZEROCONF,
{"_hap._tcp.local.": [{"domain": "homekit_controller"}]},
clear=True,
), patch.dict(
zc_gen.HOMEKIT,
{"AC02": "tado", "tado": "tado"},
clear=True,
), patch.object(
hass.config_entries.flow, "async_init"
) as mock_config_flow, patch.object(
@ -640,6 +648,10 @@ async def test_homekit_invalid_paring_status(hass, mock_async_zeroconf):
zc_gen.ZEROCONF,
{"_hap._tcp.local.": [{"domain": "homekit_controller"}]},
clear=True,
), patch.dict(
zc_gen.HOMEKIT,
{"Smart Bridge": "lutron_caseta"},
clear=True,
), patch.object(
hass.config_entries.flow, "async_init"
) as mock_config_flow, patch.object(
@ -698,7 +710,7 @@ async def test_homekit_controller_still_discovered_unpaired_for_cloud(
zc_gen.ZEROCONF,
{"_hap._udp.local.": [{"domain": "homekit_controller"}]},
clear=True,
), patch.object(
), patch.dict(zc_gen.HOMEKIT, {"Rachio": "rachio"}, clear=True,), patch.object(
hass.config_entries.flow, "async_init"
) as mock_config_flow, patch.object(
zeroconf,