From dbf3a547789ade0a0f1216598d977976f909e614 Mon Sep 17 00:00:00 2001 From: Vladimir Ermakov Date: Fri, 17 Feb 2023 19:49:47 +0100 Subject: [PATCH] tests: fix some imports Signed-off-by: Vladimir Ermakov --- .github/workflows/tests.yaml | 2 +- tests/const.py | 10 +++------- tests/test_init.py | 20 +++++--------------- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c003792..4ae7755 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -11,7 +11,7 @@ on: - cron: "0 0 * * *" env: - DEFAULT_PYTHON: '3.10' + DEFAULT_PYTHON: "3.10" jobs: pre-commit: diff --git a/tests/const.py b/tests/const.py index 2737c46..f909222 100644 --- a/tests/const.py +++ b/tests/const.py @@ -1,9 +1,5 @@ """Constants for MyHeat tests.""" -from custom_components.myheat.const import ( - CONF_PASSWORD, -) -from custom_components.myheat.const import ( - CONF_USERNAME, -) +from custom_components.myheat.const import CONF_API_KEY +from custom_components.myheat.const import CONF_USERNAME -MOCK_CONFIG = {CONF_USERNAME: "test_username", CONF_PASSWORD: "test_password"} +MOCK_CONFIG = {CONF_USERNAME: "test_username", CONF_API_KEY: "test_password"} diff --git a/tests/test_init.py b/tests/test_init.py index 1159d92..a2a2da0 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -1,20 +1,10 @@ """Test MyHeat setup process.""" import pytest -from custom_components.myheat import ( - async_reload_entry, -) -from custom_components.myheat import ( - async_setup_entry, -) -from custom_components.myheat import ( - async_unload_entry, -) -from custom_components.myheat import ( - MhDataUpdateCoordinator, -) -from custom_components.myheat.const import ( - DOMAIN, -) +from custom_components.myheat import async_reload_entry +from custom_components.myheat import async_setup_entry +from custom_components.myheat import async_unload_entry +from custom_components.myheat import MhDataUpdateCoordinator +from custom_components.myheat.const import DOMAIN from homeassistant.exceptions import ConfigEntryNotReady from pytest_homeassistant_custom_component.common import MockConfigEntry