From 7eb1b8c2fe180d297e6fd7a83cf093cfcec4adf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 9 Jan 2023 00:52:05 +0200 Subject: [PATCH] Address a few deprecation warnings in tests (#85472) --- tests/conftest.py | 2 +- tests/test_core.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 75655cf2d86..6cfd4d15823 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -627,7 +627,7 @@ def current_request(): "GET", "/some/request", 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 yield mock_request_context diff --git a/tests/test_core.py b/tests/test_core.py index 2f8db7fc0d6..d7ea89b2c41 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1128,7 +1128,12 @@ async def test_service_executed_with_subservices(hass): call2 = hass.services.async_call( "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) hass.services.async_register("test", "outer", handle_outer)