mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Address a few deprecation warnings in tests (#85472)
This commit is contained in:
parent
487782a6d1
commit
7eb1b8c2fe
@ -627,7 +627,7 @@ def current_request():
|
|||||||
"GET",
|
"GET",
|
||||||
"/some/request",
|
"/some/request",
|
||||||
headers={"Host": "example.com"},
|
headers={"Host": "example.com"},
|
||||||
sslcontext=ssl.SSLContext(ssl.PROTOCOL_TLS),
|
sslcontext=ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT),
|
||||||
)
|
)
|
||||||
mock_request_context.get.return_value = mocked_request
|
mock_request_context.get.return_value = mocked_request
|
||||||
yield mock_request_context
|
yield mock_request_context
|
||||||
|
@ -1128,7 +1128,12 @@ async def test_service_executed_with_subservices(hass):
|
|||||||
call2 = hass.services.async_call(
|
call2 = hass.services.async_call(
|
||||||
"test", "inner", blocking=True, context=call.context
|
"test", "inner", blocking=True, context=call.context
|
||||||
)
|
)
|
||||||
await asyncio.wait([call1, call2])
|
await asyncio.wait(
|
||||||
|
[
|
||||||
|
hass.async_create_task(call1),
|
||||||
|
hass.async_create_task(call2),
|
||||||
|
]
|
||||||
|
)
|
||||||
calls.append(call)
|
calls.append(call)
|
||||||
|
|
||||||
hass.services.async_register("test", "outer", handle_outer)
|
hass.services.async_register("test", "outer", handle_outer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user