Address a few deprecation warnings in tests (#85472)

This commit is contained in:
Ville Skyttä 2023-01-09 00:52:05 +02:00 committed by GitHub
parent 487782a6d1
commit 7eb1b8c2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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)