diff --git a/sdk/core/azure-core/tests/test_basic_transport.py b/sdk/core/azure-core/tests/test_basic_transport.py index 4b4fd280dc0c..27634b3bae58 100644 --- a/sdk/core/azure-core/tests/test_basic_transport.py +++ b/sdk/core/azure-core/tests/test_basic_transport.py @@ -1171,6 +1171,6 @@ def test_conflict_timeout(caplog, port, http_request): def test_aiohttp_loop(): import asyncio from azure.core.pipeline.transport import AioHttpTransport - loop = asyncio._get_running_loop() + loop = asyncio.get_event_loop() with pytest.raises(ValueError): transport = AioHttpTransport(loop=loop) diff --git a/sdk/core/azure-core/tests/test_rest_http_request.py b/sdk/core/azure-core/tests/test_rest_http_request.py index a773b99b61ba..0f16061badbd 100644 --- a/sdk/core/azure-core/tests/test_rest_http_request.py +++ b/sdk/core/azure-core/tests/test_rest_http_request.py @@ -10,7 +10,10 @@ import io import pytest import sys -import collections +try: + import collections.abc as collections +except ImportError: + import collections # type: ignore from azure.core.configuration import Configuration from azure.core.rest import HttpRequest