From 897522a82d69df200b2684e97855e29ff143bbcb Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Mon, 9 Dec 2019 19:04:38 +0100 Subject: [PATCH] Fix 'pytest.register_assert_rewrite("tests.common")' warning (#29797) see https://github.com/home-assistant/home-assistant/pull/29791/files/fea243c035f117275fda1895720d30e7f977aa9c#r355533273 --- tests/conftest.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 2b6a1a16739..41b4757c92e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,7 +13,9 @@ from homeassistant.auth.const import GROUP_ID_ADMIN, GROUP_ID_READ_ONLY from homeassistant.auth.providers import homeassistant, legacy_api_password from homeassistant.util import location -from tests.common import ( # noqa: E402 module level import not at top of file +pytest.register_assert_rewrite("tests.common") + +from tests.common import ( # noqa: E402, isort:skip CLIENT_ID, INSTANCES, MockUser, @@ -21,11 +23,7 @@ from tests.common import ( # noqa: E402 module level import not at top of file mock_coro, mock_storage as mock_storage, ) -from tests.test_util.aiohttp import ( # noqa: E402 module level import not at top of file - mock_aiohttp_client, -) - -pytest.register_assert_rewrite("tests.common") +from tests.test_util.aiohttp import mock_aiohttp_client # noqa: E402, isort:skip if os.environ.get("UVLOOP") == "1": import uvloop