mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Adjust yeelight ssdp_listener tests (#61065)
This commit is contained in:
parent
4e9fd56b8c
commit
fb5cc13061
@ -157,7 +157,7 @@ def _mocked_bulb(cannot_connect=False):
|
|||||||
return bulb
|
return bulb
|
||||||
|
|
||||||
|
|
||||||
def _patched_ssdp_listener(info, *args, **kwargs):
|
def _patched_ssdp_listener(info: ssdp.SsdpHeaders, *args, **kwargs):
|
||||||
listener = SsdpSearchListener(*args, **kwargs)
|
listener = SsdpSearchListener(*args, **kwargs)
|
||||||
|
|
||||||
async def _async_callback(*_):
|
async def _async_callback(*_):
|
||||||
@ -181,12 +181,7 @@ def _patch_discovery(no_device=False, capabilities=None):
|
|||||||
def _generate_fake_ssdp_listener(*args, **kwargs):
|
def _generate_fake_ssdp_listener(*args, **kwargs):
|
||||||
info = None
|
info = None
|
||||||
if not no_device:
|
if not no_device:
|
||||||
info = ssdp.SsdpServiceInfo(
|
info = capabilities or CAPABILITIES
|
||||||
ssdp_usn="",
|
|
||||||
ssdp_st=scanner.SSDP_ST,
|
|
||||||
upnp={},
|
|
||||||
ssdp_headers=capabilities or CAPABILITIES,
|
|
||||||
)
|
|
||||||
return _patched_ssdp_listener(info, *args, **kwargs)
|
return _patched_ssdp_listener(info, *args, **kwargs)
|
||||||
|
|
||||||
return patch(
|
return patch(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user