mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Import Generator from collections.abc (3) (#120916)
This commit is contained in:
parent
2f0dd6f704
commit
921430d497
@ -1,6 +1,6 @@
|
|||||||
"""Common fixtures for the Gardena Bluetooth tests."""
|
"""Common fixtures for the Gardena Bluetooth tests."""
|
||||||
|
|
||||||
from collections.abc import Callable, Coroutine
|
from collections.abc import Callable, Coroutine, Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
|
|
||||||
@ -10,7 +10,6 @@ from gardena_bluetooth.const import DeviceInformation
|
|||||||
from gardena_bluetooth.exceptions import CharacteristicNotFound
|
from gardena_bluetooth.exceptions import CharacteristicNotFound
|
||||||
from gardena_bluetooth.parse import Characteristic
|
from gardena_bluetooth.parse import Characteristic
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.gardena_bluetooth.const import DOMAIN
|
from homeassistant.components.gardena_bluetooth.const import DOMAIN
|
||||||
from homeassistant.components.gardena_bluetooth.coordinator import SCAN_INTERVAL
|
from homeassistant.components.gardena_bluetooth.coordinator import SCAN_INTERVAL
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Configuration for GeoJSON Events tests."""
|
"""Configuration for GeoJSON Events tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.geo_json_events import DOMAIN
|
from homeassistant.components.geo_json_events import DOMAIN
|
||||||
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_RADIUS, CONF_URL
|
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_RADIUS, CONF_URL
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from geocachingapi import GeocachingStatus
|
from geocachingapi import GeocachingStatus
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.geocaching.const import DOMAIN
|
from homeassistant.components.geocaching.const import DOMAIN
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""conftest for the GitHub integration."""
|
"""conftest for the GitHub integration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.github.const import CONF_REPOSITORIES, DOMAIN
|
from homeassistant.components.github.const import CONF_REPOSITORIES, DOMAIN
|
||||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import Awaitable, Callable
|
from collections.abc import AsyncGenerator, Awaitable, Callable, Generator
|
||||||
import datetime
|
import datetime
|
||||||
import http
|
import http
|
||||||
import time
|
import time
|
||||||
@ -13,7 +13,6 @@ from aiohttp.client_exceptions import ClientError
|
|||||||
from gcal_sync.auth import API_BASE_URL
|
from gcal_sync.auth import API_BASE_URL
|
||||||
from oauth2client.client import OAuth2Credentials
|
from oauth2client.client import OAuth2Credentials
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import AsyncGenerator, Generator
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from homeassistant.components.application_credentials import (
|
from homeassistant.components.application_credentials import (
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Test the Google Sheets config flow."""
|
"""Test the Google Sheets config flow."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import Mock, patch
|
from unittest.mock import Mock, patch
|
||||||
|
|
||||||
from gspread import GSpreadException
|
from gspread import GSpreadException
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.components.application_credentials import (
|
from homeassistant.components.application_credentials import (
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Test the Google Tasks config flow."""
|
"""Test the Google Tasks config flow."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import Mock, patch
|
from unittest.mock import Mock, patch
|
||||||
|
|
||||||
from googleapiclient.errors import HttpError
|
from googleapiclient.errors import HttpError
|
||||||
from httplib2 import Response
|
from httplib2 import Response
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.components.google_tasks.const import (
|
from homeassistant.components.google_tasks.const import (
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Common fixtures for the Google Translate text-to-speech tests."""
|
"""Common fixtures for the Google Translate text-to-speech tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@ -9,7 +10,6 @@ from unittest.mock import MagicMock, patch
|
|||||||
|
|
||||||
from gtts import gTTSError
|
from gtts import gTTSError
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components import tts
|
from homeassistant.components import tts
|
||||||
from homeassistant.components.google_translate.const import CONF_TLD, DOMAIN
|
from homeassistant.components.google_translate.const import CONF_TLD, DOMAIN
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Tests configuration for Govee Local API."""
|
"""Tests configuration for Govee Local API."""
|
||||||
|
|
||||||
from asyncio import Event
|
from asyncio import Event
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from govee_local_api import GoveeLightCapability
|
from govee_local_api import GoveeLightCapability
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.govee_light_local.coordinator import GoveeController
|
from homeassistant.components.govee_light_local.coordinator import GoveeController
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Common fixtures for the GPSD tests."""
|
"""Common fixtures for the GPSD tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Pytest module configuration."""
|
"""Pytest module configuration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from .common import FakeDiscovery, build_device_mock
|
from .common import FakeDiscovery, build_device_mock
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Common fixtures for testing greeneye_monitor."""
|
"""Common fixtures for testing greeneye_monitor."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.greeneye_monitor import DOMAIN
|
from homeassistant.components.greeneye_monitor import DOMAIN
|
||||||
from homeassistant.components.sensor import SensorDeviceClass
|
from homeassistant.components.sensor import SensorDeviceClass
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Define fixtures for Elexa Guardian tests."""
|
"""Define fixtures for Elexa Guardian tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import json
|
import json
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.guardian import CONF_UID, DOMAIN
|
from homeassistant.components.guardian import CONF_UID, DOMAIN
|
||||||
from homeassistant.const import CONF_IP_ADDRESS, CONF_PORT
|
from homeassistant.const import CONF_IP_ADDRESS, CONF_PORT
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Fixtures for harmony tests."""
|
"""Fixtures for harmony tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch
|
from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch
|
||||||
|
|
||||||
from aioharmony.const import ClientCallbackType
|
from aioharmony.const import ClientCallbackType
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.harmony.const import ACTIVITY_POWER_OFF, DOMAIN
|
from homeassistant.components.harmony.const import ACTIVITY_POWER_OFF, DOMAIN
|
||||||
from homeassistant.const import CONF_HOST, CONF_NAME
|
from homeassistant.const import CONF_HOST, CONF_NAME
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
from collections.abc import Generator
|
||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, call, patch
|
from unittest.mock import AsyncMock, call, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.hassio.addon_manager import (
|
from homeassistant.components.hassio.addon_manager import (
|
||||||
AddonError,
|
AddonError,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Common fixtures for the Holiday tests."""
|
"""Common fixtures for the Holiday tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Test fixtures for the Home Assistant Hardware integration."""
|
"""Test fixtures for the Home Assistant Hardware integration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.hassio import AddonError, AddonInfo, AddonState, HassIO
|
from homeassistant.components.hassio import AddonError, AddonInfo, AddonState, HassIO
|
||||||
from homeassistant.components.hassio.handler import HassioAPIError
|
from homeassistant.components.hassio.handler import HassioAPIError
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Test fixtures for the Home Assistant SkyConnect integration."""
|
"""Test fixtures for the Home Assistant SkyConnect integration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="mock_usb_serial_by_id", autouse=True)
|
@pytest.fixture(name="mock_usb_serial_by_id", autouse=True)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Test fixtures for the Home Assistant Yellow integration."""
|
"""Test fixtures for the Home Assistant Yellow integration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Test the Home Assistant Yellow config flow."""
|
"""Test the Home Assistant Yellow config flow."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import Mock, patch
|
from unittest.mock import Mock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.hassio import DOMAIN as HASSIO_DOMAIN
|
from homeassistant.components.hassio import DOMAIN as HASSIO_DOMAIN
|
||||||
from homeassistant.components.homeassistant_yellow.const import DOMAIN
|
from homeassistant.components.homeassistant_yellow.const import DOMAIN
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""HomeKit controller session fixtures."""
|
"""HomeKit controller session fixtures."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import datetime
|
import datetime
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
@ -7,7 +8,6 @@ from aiohomekit.testing import FakeController
|
|||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
from freezegun.api import FrozenDateTimeFactory
|
from freezegun.api import FrozenDateTimeFactory
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Fixtures for HomeWizard integration tests."""
|
"""Fixtures for HomeWizard integration tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from homewizard_energy.errors import NotFoundError
|
from homewizard_energy.errors import NotFoundError
|
||||||
from homewizard_energy.models import Data, Device, State, System
|
from homewizard_energy.models import Data, Device, State, System
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.homewizard.const import DOMAIN
|
from homeassistant.components.homewizard.const import DOMAIN
|
||||||
from homeassistant.const import CONF_IP_ADDRESS
|
from homeassistant.const import CONF_IP_ADDRESS
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Common fixtures for the Lutron Homeworks Series 4 and 8 tests."""
|
"""Common fixtures for the Lutron Homeworks Series 4 and 8 tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.homeworks.const import (
|
from homeassistant.components.homeworks.const import (
|
||||||
CONF_ADDR,
|
CONF_ADDR,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Common fixtures for Hunter Douglas Powerview tests."""
|
"""Common fixtures for Hunter Douglas Powerview tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch
|
from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch
|
||||||
|
|
||||||
from aiopvapi.resources.shade import ShadePosition
|
from aiopvapi.resources.shade import ShadePosition
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.hunterdouglas_powerview.const import DOMAIN
|
from homeassistant.components.hunterdouglas_powerview.const import DOMAIN
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""Test helpers for Husqvarna Automower."""
|
"""Test helpers for Husqvarna Automower."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import time
|
import time
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
@ -7,7 +8,6 @@ from aioautomower.session import AutomowerSession, _MowerCommands
|
|||||||
from aioautomower.utils import mower_list_to_dictionary_dataclass
|
from aioautomower.utils import mower_list_to_dictionary_dataclass
|
||||||
from aiohttp import ClientWebSocketResponse
|
from aiohttp import ClientWebSocketResponse
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.application_credentials import (
|
from homeassistant.components.application_credentials import (
|
||||||
ClientCredential,
|
ClientCredential,
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
"""IKEA Idasen Desk fixtures."""
|
"""IKEA Idasen Desk fixtures."""
|
||||||
|
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable, Generator
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
from unittest.mock import AsyncMock, MagicMock
|
from unittest.mock import AsyncMock, MagicMock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
"""Test helpers for image."""
|
"""Test helpers for image."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components import image
|
from homeassistant.components import image
|
||||||
from homeassistant.config_entries import ConfigEntry, ConfigFlow
|
from homeassistant.config_entries import ConfigEntry, ConfigFlow
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Fixtures for imap tests."""
|
"""Fixtures for imap tests."""
|
||||||
|
|
||||||
|
from collections.abc import AsyncGenerator, Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from aioimaplib import AUTH, LOGOUT, NONAUTH, SELECTED, STARTED, Response
|
from aioimaplib import AUTH, LOGOUT, NONAUTH, SELECTED, STARTED, Response
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import AsyncGenerator, Generator
|
|
||||||
|
|
||||||
from .const import EMPTY_SEARCH_RESPONSE, TEST_FETCH_RESPONSE_TEXT_PLAIN
|
from .const import EMPTY_SEARCH_RESPONSE, TEST_FETCH_RESPONSE_TEXT_PLAIN
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Common fixtures for the IMGW-PIB tests."""
|
"""Common fixtures for the IMGW-PIB tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from datetime import UTC, datetime
|
from datetime import UTC, datetime
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
from imgw_pib import HydrologicalData, SensorData
|
from imgw_pib import HydrologicalData, SensorData
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.imgw_pib.const import DOMAIN
|
from homeassistant.components.imgw_pib.const import DOMAIN
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Fixtures for Intergas InComfort integration."""
|
"""Fixtures for Intergas InComfort integration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from incomfortclient import DisplayCode
|
from incomfortclient import DisplayCode
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.incomfort import DOMAIN
|
from homeassistant.components.incomfort import DOMAIN
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""The tests for the InfluxDB component."""
|
"""The tests for the InfluxDB component."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
import datetime
|
import datetime
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
@ -7,7 +8,6 @@ import logging
|
|||||||
from unittest.mock import ANY, MagicMock, Mock, call, patch
|
from unittest.mock import ANY, MagicMock, Mock, call, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components import influxdb
|
from homeassistant.components import influxdb
|
||||||
from homeassistant.components.influxdb.const import DEFAULT_BUCKET
|
from homeassistant.components.influxdb.const import DEFAULT_BUCKET
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
@ -10,7 +11,6 @@ from unittest.mock import MagicMock, patch
|
|||||||
from influxdb.exceptions import InfluxDBClientError, InfluxDBServerError
|
from influxdb.exceptions import InfluxDBClientError, InfluxDBServerError
|
||||||
from influxdb_client.rest import ApiException
|
from influxdb_client.rest import ApiException
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
from voluptuous import Invalid
|
from voluptuous import Invalid
|
||||||
|
|
||||||
from homeassistant.components import sensor
|
from homeassistant.components import sensor
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Fixtures for IntelliFire integration tests."""
|
"""Fixtures for IntelliFire integration tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, Mock, patch
|
from unittest.mock import AsyncMock, MagicMock, Mock, patch
|
||||||
|
|
||||||
from aiohttp.client_reqrep import ConnectionKey
|
from aiohttp.client_reqrep import ConnectionKey
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Tests for IPMA config flow."""
|
"""Tests for IPMA config flow."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from pyipma import IPMAException
|
from pyipma import IPMAException
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.ipma.const import DOMAIN
|
from homeassistant.components.ipma.const import DOMAIN
|
||||||
from homeassistant.config_entries import SOURCE_USER
|
from homeassistant.config_entries import SOURCE_USER
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Fixtures for IPP integration tests."""
|
"""Fixtures for IPP integration tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import json
|
import json
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from pyipp import Printer
|
from pyipp import Printer
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.ipp.const import CONF_BASE_PATH, DOMAIN
|
from homeassistant.components.ipp.const import CONF_BASE_PATH, DOMAIN
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Common fixtures for the islamic_prayer_times tests."""
|
"""Common fixtures for the islamic_prayer_times tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Common fixtures for the ista EcoTrend tests."""
|
"""Common fixtures for the ista EcoTrend tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.ista_ecotrend.const import DOMAIN
|
from homeassistant.components.ista_ecotrend.const import DOMAIN
|
||||||
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
|
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, create_autospec, patch
|
from unittest.mock import AsyncMock, MagicMock, create_autospec, patch
|
||||||
|
|
||||||
from jellyfin_apiclient_python import JellyfinClient
|
from jellyfin_apiclient_python import JellyfinClient
|
||||||
@ -9,7 +10,6 @@ from jellyfin_apiclient_python.api import API
|
|||||||
from jellyfin_apiclient_python.configuration import Config
|
from jellyfin_apiclient_python.configuration import Config
|
||||||
from jellyfin_apiclient_python.connection_manager import ConnectionManager
|
from jellyfin_apiclient_python.connection_manager import ConnectionManager
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.jellyfin.const import DOMAIN
|
from homeassistant.components.jellyfin.const import DOMAIN
|
||||||
from homeassistant.const import CONF_PASSWORD, CONF_URL, CONF_USERNAME
|
from homeassistant.const import CONF_PASSWORD, CONF_URL, CONF_USERNAME
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Common fixtures for the jewish_calendar tests."""
|
"""Common fixtures for the jewish_calendar tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.jewish_calendar.const import DEFAULT_NAME, DOMAIN
|
from homeassistant.components.jewish_calendar.const import DEFAULT_NAME, DOMAIN
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Fixtures for JVC Projector integration."""
|
"""Fixtures for JVC Projector integration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.jvc_projector.const import DOMAIN
|
from homeassistant.components.jvc_projector.const import DOMAIN
|
||||||
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT
|
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Fixtures for Kaleidescape integration."""
|
"""Fixtures for Kaleidescape integration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
from kaleidescape import Dispatcher
|
from kaleidescape import Dispatcher
|
||||||
from kaleidescape.device import Automation, Movie, Power, System
|
from kaleidescape.device import Automation, Movie, Power, System
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.kaleidescape.const import DOMAIN
|
from homeassistant.components.kaleidescape.const import DOMAIN
|
||||||
from homeassistant.const import CONF_HOST
|
from homeassistant.const import CONF_HOST
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""The tests for the demo button component."""
|
"""The tests for the demo button component."""
|
||||||
|
|
||||||
|
from collections.abc import AsyncGenerator
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from freezegun.api import FrozenDateTimeFactory
|
from freezegun.api import FrozenDateTimeFactory
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import AsyncGenerator
|
|
||||||
|
|
||||||
from homeassistant.components.kitchen_sink import DOMAIN
|
from homeassistant.components.kitchen_sink import DOMAIN
|
||||||
from homeassistant.components.notify import (
|
from homeassistant.components.notify import (
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Define fixtures for kmtronic tests."""
|
"""Define fixtures for kmtronic tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Common fixtures for the Knocki tests."""
|
"""Common fixtures for the Knocki tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
from knocki import TokenResponse, Trigger
|
from knocki import TokenResponse, Trigger
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.knocki.const import DOMAIN
|
from homeassistant.components.knocki.const import DOMAIN
|
||||||
from homeassistant.const import CONF_TOKEN
|
from homeassistant.const import CONF_TOKEN
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from pykoplenti import MeData, VersionData
|
from pykoplenti import MeData, VersionData
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.kostal_plenticore.coordinator import Plenticore
|
from homeassistant.components.kostal_plenticore.coordinator import Plenticore
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Test the Kostal Plenticore Solar Inverter config flow."""
|
"""Test the Kostal Plenticore Solar Inverter config flow."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import ANY, AsyncMock, MagicMock, patch
|
from unittest.mock import ANY, AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from pykoplenti import ApiClient, AuthenticationException, SettingsData
|
from pykoplenti import ApiClient, AuthenticationException, SettingsData
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.components.kostal_plenticore.const import DOMAIN
|
from homeassistant.components.kostal_plenticore.const import DOMAIN
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Test Kostal Plenticore helper."""
|
"""Test Kostal Plenticore helper."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from pykoplenti import ApiClient, ExtendedApiClient, SettingsData
|
from pykoplenti import ApiClient, ExtendedApiClient, SettingsData
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.kostal_plenticore.const import DOMAIN
|
from homeassistant.components.kostal_plenticore.const import DOMAIN
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Test Kostal Plenticore number."""
|
"""Test Kostal Plenticore number."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from pykoplenti import ApiClient, SettingsData
|
from pykoplenti import ApiClient, SettingsData
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.number import (
|
from homeassistant.components.number import (
|
||||||
ATTR_MAX,
|
ATTR_MAX,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Define fixtures for LaCrosse View tests."""
|
"""Define fixtures for LaCrosse View tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"""Lamarzocco session fixtures."""
|
"""Lamarzocco session fixtures."""
|
||||||
|
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable, Generator
|
||||||
import json
|
import json
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
@ -9,7 +9,6 @@ from lmcloud.const import FirmwareType, MachineModel, SteamLevel
|
|||||||
from lmcloud.lm_machine import LaMarzoccoMachine
|
from lmcloud.lm_machine import LaMarzoccoMachine
|
||||||
from lmcloud.models import LaMarzoccoDeviceInfo
|
from lmcloud.models import LaMarzoccoDeviceInfo
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.lamarzocco.const import DOMAIN
|
from homeassistant.components.lamarzocco.const import DOMAIN
|
||||||
from homeassistant.const import CONF_HOST, CONF_MODEL, CONF_NAME, CONF_TOKEN
|
from homeassistant.const import CONF_HOST, CONF_MODEL, CONF_NAME, CONF_TOKEN
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from demetriek import CloudDevice, Device
|
from demetriek import CloudDevice, Device
|
||||||
from pydantic import parse_raw_as # pylint: disable=no-name-in-module
|
from pydantic import parse_raw_as # pylint: disable=no-name-in-module
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.application_credentials import (
|
from homeassistant.components.application_credentials import (
|
||||||
ClientCredential,
|
ClientCredential,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Define fixtures for Landis + Gyr Heat Meter tests."""
|
"""Define fixtures for Landis + Gyr Heat Meter tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""The tests for the lawn mower integration."""
|
"""The tests for the lawn mower integration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import MagicMock
|
from unittest.mock import MagicMock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.lawn_mower import (
|
from homeassistant.components.lawn_mower import (
|
||||||
DOMAIN as LAWN_MOWER_DOMAIN,
|
DOMAIN as LAWN_MOWER_DOMAIN,
|
||||||
|
@ -2,13 +2,12 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import Awaitable, Callable
|
from collections.abc import Awaitable, Callable, Generator
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
|
|
||||||
from aiohttp.client_exceptions import ClientError
|
from aiohttp.client_exceptions import ClientError
|
||||||
from aiopyarr.lidarr_client import LidarrClient
|
from aiopyarr.lidarr_client import LidarrClient
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.lidarr.const import DOMAIN
|
from homeassistant.components.lidarr.const import DOMAIN
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Common fixtures for the Linear Garage Door tests."""
|
"""Common fixtures for the Linear Garage Door tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.linear_garage_door import DOMAIN
|
from homeassistant.components.linear_garage_door import DOMAIN
|
||||||
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
|
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"""Fixtures for local calendar."""
|
"""Fixtures for local calendar."""
|
||||||
|
|
||||||
from collections.abc import Awaitable, Callable
|
from collections.abc import Awaitable, Callable, Generator
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@ -9,7 +9,6 @@ import urllib
|
|||||||
|
|
||||||
from aiohttp import ClientWebSocketResponse
|
from aiohttp import ClientWebSocketResponse
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.local_calendar import LocalCalendarStore
|
from homeassistant.components.local_calendar import LocalCalendarStore
|
||||||
from homeassistant.components.local_calendar.const import CONF_CALENDAR_NAME, DOMAIN
|
from homeassistant.components.local_calendar.const import CONF_CALENDAR_NAME, DOMAIN
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Common fixtures for the local_todo tests."""
|
"""Common fixtures for the local_todo tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.local_todo import LocalTodoListStore
|
from homeassistant.components.local_todo import LocalTodoListStore
|
||||||
from homeassistant.components.local_todo.const import (
|
from homeassistant.components.local_todo.const import (
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Fixtures for the lock entity platform tests."""
|
"""Fixtures for the lock entity platform tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import MagicMock
|
from unittest.mock import MagicMock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.lock import (
|
from homeassistant.components.lock import (
|
||||||
DOMAIN as LOCK_DOMAIN,
|
DOMAIN as LOCK_DOMAIN,
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
"""Contains fixtures for Loqed tests."""
|
"""Contains fixtures for Loqed tests."""
|
||||||
|
|
||||||
|
from collections.abc import AsyncGenerator
|
||||||
import json
|
import json
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
|
|
||||||
from loqedAPI import loqed
|
from loqedAPI import loqed
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import AsyncGenerator
|
|
||||||
|
|
||||||
from homeassistant.components.loqed import DOMAIN
|
from homeassistant.components.loqed import DOMAIN
|
||||||
from homeassistant.components.loqed.const import CONF_CLOUDHOOK_URL
|
from homeassistant.components.loqed.const import CONF_CLOUDHOOK_URL
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Test the Lovelace Cast platform."""
|
"""Test the Lovelace Cast platform."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from time import time
|
from time import time
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.lovelace import cast as lovelace_cast
|
from homeassistant.components.lovelace import cast as lovelace_cast
|
||||||
from homeassistant.components.media_player import MediaClass
|
from homeassistant.components.media_player import MediaClass
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Test the Lovelace initialization."""
|
"""Test the Lovelace initialization."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import time
|
import time
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components import frontend
|
from homeassistant.components import frontend
|
||||||
from homeassistant.components.lovelace import const, dashboard
|
from homeassistant.components.lovelace import const, dashboard
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Test the Lovelace initialization."""
|
"""Test the Lovelace initialization."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Tests for Lovelace system health."""
|
"""Tests for Lovelace system health."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.lovelace import dashboard
|
from homeassistant.components.lovelace import dashboard
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.luftdaten.const import CONF_SENSOR_ID, DOMAIN
|
from homeassistant.components.luftdaten.const import CONF_SENSOR_ID, DOMAIN
|
||||||
from homeassistant.const import CONF_SHOW_ON_MAP
|
from homeassistant.const import CONF_SHOW_ON_MAP
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Provide common Lutron fixtures and mocks."""
|
"""Provide common Lutron fixtures and mocks."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Test the Map initialization."""
|
"""Test the Map initialization."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.map import DOMAIN
|
from homeassistant.components.map import DOMAIN
|
||||||
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
|
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import re
|
import re
|
||||||
import tempfile
|
import tempfile
|
||||||
@ -24,7 +25,6 @@ from nio import (
|
|||||||
)
|
)
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.matrix import (
|
from homeassistant.components.matrix import (
|
||||||
CONF_COMMANDS,
|
CONF_COMMANDS,
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
from collections.abc import AsyncGenerator, Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from matter_server.client.models.node import MatterNode
|
from matter_server.client.models.node import MatterNode
|
||||||
from matter_server.common.const import SCHEMA_VERSION
|
from matter_server.common.const import SCHEMA_VERSION
|
||||||
from matter_server.common.models import ServerInfoMessage
|
from matter_server.common.models import ServerInfoMessage
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import AsyncGenerator, Generator
|
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Test Matter binary sensors."""
|
"""Test Matter binary sensors."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
from matter_server.client.models.node import MatterNode
|
from matter_server.client.models.node import MatterNode
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.matter.binary_sensor import (
|
from homeassistant.components.matter.binary_sensor import (
|
||||||
DISCOVERY_SCHEMAS as BINARY_SENSOR_SCHEMAS,
|
DISCOVERY_SCHEMAS as BINARY_SENSOR_SCHEMAS,
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from ipaddress import ip_address
|
from ipaddress import ip_address
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import DEFAULT, AsyncMock, MagicMock, call, patch
|
from unittest.mock import DEFAULT, AsyncMock, MagicMock, call, patch
|
||||||
|
|
||||||
from matter_server.client.exceptions import CannotConnect, InvalidServerVersion
|
from matter_server.client.exceptions import CannotConnect, InvalidServerVersion
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.components.hassio import HassioAPIError, HassioServiceInfo
|
from homeassistant.components.hassio import HassioAPIError, HassioServiceInfo
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, call, patch
|
from unittest.mock import AsyncMock, MagicMock, call, patch
|
||||||
|
|
||||||
from matter_server.client.exceptions import (
|
from matter_server.client.exceptions import (
|
||||||
@ -15,7 +16,6 @@ from matter_server.common.errors import MatterError
|
|||||||
from matter_server.common.helpers.util import dataclass_from_dict
|
from matter_server.common.helpers.util import dataclass_from_dict
|
||||||
from matter_server.common.models import MatterNodeData
|
from matter_server.common.models import MatterNodeData
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.hassio import HassioAPIError
|
from homeassistant.components.hassio import HassioAPIError
|
||||||
from homeassistant.components.matter.const import DOMAIN
|
from homeassistant.components.matter.const import DOMAIN
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Mealie tests configuration."""
|
"""Mealie tests configuration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from aiomealie import Mealplan, MealplanResponse, UserInfo
|
from aiomealie import Mealplan, MealplanResponse, UserInfo
|
||||||
from mashumaro.codecs.orjson import ORJSONDecoder
|
from mashumaro.codecs.orjson import ORJSONDecoder
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.mealie.const import DOMAIN
|
from homeassistant.components.mealie.const import DOMAIN
|
||||||
from homeassistant.const import CONF_API_TOKEN, CONF_HOST
|
from homeassistant.const import CONF_API_TOKEN, CONF_HOST
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Common fixtures for the Media Extractor tests."""
|
"""Common fixtures for the Media Extractor tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.media_extractor import DOMAIN
|
from homeassistant.components.media_extractor import DOMAIN
|
||||||
from homeassistant.core import HomeAssistant, ServiceCall
|
from homeassistant.core import HomeAssistant, ServiceCall
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""Test Local Media Source."""
|
"""Test Local Media Source."""
|
||||||
|
|
||||||
|
from collections.abc import AsyncGenerator
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
import io
|
import io
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -7,7 +8,6 @@ from tempfile import TemporaryDirectory
|
|||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import AsyncGenerator
|
|
||||||
|
|
||||||
from homeassistant.components import media_source, websocket_api
|
from homeassistant.components import media_source, websocket_api
|
||||||
from homeassistant.components.media_source import const
|
from homeassistant.components.media_source import const
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from datetime import UTC, datetime, time, timedelta
|
from datetime import UTC, datetime, time, timedelta
|
||||||
from unittest.mock import AsyncMock, _patch, patch
|
from unittest.mock import AsyncMock, _patch, patch
|
||||||
|
|
||||||
from melnor_bluetooth.device import Device
|
from melnor_bluetooth.device import Device
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.bluetooth.models import BluetoothServiceInfoBleak
|
from homeassistant.components.bluetooth.models import BluetoothServiceInfoBleak
|
||||||
from homeassistant.components.melnor.const import DOMAIN
|
from homeassistant.components.melnor.const import DOMAIN
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from requests_mock import Mocker
|
from requests_mock import Mocker
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.mjpeg.const import (
|
from homeassistant.components.mjpeg.const import (
|
||||||
CONF_MJPEG_URL,
|
CONF_MJPEG_URL,
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.moon.const import DOMAIN
|
from homeassistant.components.moon.const import DOMAIN
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Setup the Motionblinds Bluetooth tests."""
|
"""Setup the Motionblinds Bluetooth tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
TEST_MAC = "abcd"
|
TEST_MAC = "abcd"
|
||||||
TEST_NAME = f"MOTION_{TEST_MAC.upper()}"
|
TEST_NAME = f"MOTION_{TEST_MAC.upper()}"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Fixtures for Vogel's MotionMount integration tests."""
|
"""Fixtures for Vogel's MotionMount integration tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.motionmount.const import DOMAIN
|
from homeassistant.components.motionmount.const import DOMAIN
|
||||||
from homeassistant.const import CONF_HOST, CONF_PORT
|
from homeassistant.const import CONF_HOST, CONF_PORT
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
"""Test fixtures for mqtt component."""
|
"""Test fixtures for mqtt component."""
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
from collections.abc import AsyncGenerator, Generator
|
||||||
from random import getrandbits
|
from random import getrandbits
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import AsyncGenerator, Generator
|
|
||||||
|
|
||||||
from homeassistant.components import mqtt
|
from homeassistant.components import mqtt
|
||||||
from homeassistant.components.mqtt.models import MessageCallbackType, ReceiveMessage
|
from homeassistant.components.mqtt.models import MessageCallbackType, ReceiveMessage
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"""Test config flow."""
|
"""Test config flow."""
|
||||||
|
|
||||||
from collections.abc import Iterator
|
from collections.abc import Generator, Iterator
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from ssl import SSLError
|
from ssl import SSLError
|
||||||
@ -9,7 +9,6 @@ from unittest.mock import AsyncMock, MagicMock, patch
|
|||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""The tests for MQTT tag scanner."""
|
"""The tests for MQTT tag scanner."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
from unittest.mock import ANY, AsyncMock, patch
|
from unittest.mock import ANY, AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.device_automation import DeviceAutomationType
|
from homeassistant.components.device_automation import DeviceAutomationType
|
||||||
from homeassistant.components.mqtt.const import DOMAIN as MQTT_DOMAIN
|
from homeassistant.components.mqtt.const import DOMAIN as MQTT_DOMAIN
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
"""The tests for the JSON MQTT device tracker platform."""
|
"""The tests for the JSON MQTT device tracker platform."""
|
||||||
|
|
||||||
|
from collections.abc import AsyncGenerator
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import AsyncGenerator
|
|
||||||
|
|
||||||
from homeassistant.components.device_tracker.legacy import (
|
from homeassistant.components.device_tracker.legacy import (
|
||||||
DOMAIN as DT_DOMAIN,
|
DOMAIN as DT_DOMAIN,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import Callable
|
from collections.abc import AsyncGenerator, Callable, Generator
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
import json
|
import json
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@ -12,7 +12,6 @@ from mysensors import BaseSyncGateway
|
|||||||
from mysensors.persistence import MySensorsJSONDecoder
|
from mysensors.persistence import MySensorsJSONDecoder
|
||||||
from mysensors.sensor import Sensor
|
from mysensors.sensor import Sensor
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import AsyncGenerator, Generator
|
|
||||||
|
|
||||||
from homeassistant.components.mqtt import DOMAIN as MQTT_DOMAIN
|
from homeassistant.components.mqtt import DOMAIN as MQTT_DOMAIN
|
||||||
from homeassistant.components.mysensors.config_flow import DEFAULT_BAUD_RATE
|
from homeassistant.components.mysensors.config_flow import DEFAULT_BAUD_RATE
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Provide common mystrom fixtures and mocks."""
|
"""Provide common mystrom fixtures and mocks."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.mystrom.const import DOMAIN
|
from homeassistant.components.mystrom.const import DOMAIN
|
||||||
from homeassistant.const import CONF_HOST
|
from homeassistant.const import CONF_HOST
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""Test helpers for myuplink."""
|
"""Test helpers for myuplink."""
|
||||||
|
|
||||||
|
from collections.abc import AsyncGenerator, Generator
|
||||||
import time
|
import time
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
@ -7,7 +8,6 @@ from unittest.mock import MagicMock, patch
|
|||||||
from myuplink import Device, DevicePoint, System
|
from myuplink import Device, DevicePoint, System
|
||||||
import orjson
|
import orjson
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import AsyncGenerator, Generator
|
|
||||||
|
|
||||||
from homeassistant.components.application_credentials import (
|
from homeassistant.components.application_credentials import (
|
||||||
ClientCredential,
|
ClientCredential,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import Awaitable, Callable
|
from collections.abc import Awaitable, Callable, Generator
|
||||||
import copy
|
import copy
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
import time
|
import time
|
||||||
@ -14,7 +14,6 @@ from google_nest_sdm.device_manager import DeviceManager
|
|||||||
from google_nest_sdm.event import EventMessage
|
from google_nest_sdm.event import EventMessage
|
||||||
from google_nest_sdm.event_media import CachePolicy
|
from google_nest_sdm.event_media import CachePolicy
|
||||||
from google_nest_sdm.google_nest_subscriber import GoogleNestSubscriber
|
from google_nest_sdm.google_nest_subscriber import GoogleNestSubscriber
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.application_credentials import ClientCredential
|
from homeassistant.components.application_credentials import ClientCredential
|
||||||
from homeassistant.components.nest import DOMAIN
|
from homeassistant.components.nest import DOMAIN
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from asyncio import AbstractEventLoop
|
from asyncio import AbstractEventLoop
|
||||||
|
from collections.abc import Generator
|
||||||
import copy
|
import copy
|
||||||
import shutil
|
import shutil
|
||||||
import time
|
import time
|
||||||
@ -15,7 +16,6 @@ from google_nest_sdm import diagnostics
|
|||||||
from google_nest_sdm.auth import AbstractAuth
|
from google_nest_sdm.auth import AbstractAuth
|
||||||
from google_nest_sdm.device_manager import DeviceManager
|
from google_nest_sdm.device_manager import DeviceManager
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.application_credentials import (
|
from homeassistant.components.application_credentials import (
|
||||||
async_import_client_credential,
|
async_import_client_credential,
|
||||||
|
@ -4,6 +4,7 @@ These tests fake out the subscriber/devicemanager, and are not using a real
|
|||||||
pubsub subscriber.
|
pubsub subscriber.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import datetime
|
import datetime
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
@ -12,7 +13,6 @@ import aiohttp
|
|||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
from google_nest_sdm.event import EventMessage
|
from google_nest_sdm.event import EventMessage
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components import camera
|
from homeassistant.components import camera
|
||||||
from homeassistant.components.camera import STATE_IDLE, STATE_STREAMING, StreamType
|
from homeassistant.components.camera import STATE_IDLE, STATE_STREAMING, StreamType
|
||||||
|
@ -8,6 +8,7 @@ mode (e.g. yaml, ConfigEntry, etc) however some tests override and just run in
|
|||||||
relevant modes.
|
relevant modes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
@ -19,7 +20,6 @@ from google_nest_sdm.exceptions import (
|
|||||||
SubscriberException,
|
SubscriberException,
|
||||||
)
|
)
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.nest import DOMAIN
|
from homeassistant.components.nest import DOMAIN
|
||||||
from homeassistant.config_entries import ConfigEntryState
|
from homeassistant.config_entries import ConfigEntryState
|
||||||
|
@ -4,6 +4,7 @@ These tests simulate recent camera events received by the subscriber exposed
|
|||||||
as media in the media source.
|
as media in the media source.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import datetime
|
import datetime
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
import io
|
import io
|
||||||
@ -15,7 +16,6 @@ import av
|
|||||||
from google_nest_sdm.event import EventMessage
|
from google_nest_sdm.event import EventMessage
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.media_player.errors import BrowseError
|
from homeassistant.components.media_player.errors import BrowseError
|
||||||
from homeassistant.components.media_source import (
|
from homeassistant.components.media_source import (
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Tests for the Network Configuration integration."""
|
"""Tests for the Network Configuration integration."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import _patch
|
from unittest.mock import _patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Test the NextBus config flow."""
|
"""Test the NextBus config flow."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant import config_entries, setup
|
from homeassistant import config_entries, setup
|
||||||
from homeassistant.components.nextbus.const import CONF_AGENCY, CONF_ROUTE, DOMAIN
|
from homeassistant.components.nextbus.const import CONF_AGENCY, CONF_ROUTE, DOMAIN
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
"""The tests for the nexbus sensor component."""
|
"""The tests for the nexbus sensor component."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
from urllib.error import HTTPError
|
from urllib.error import HTTPError
|
||||||
|
|
||||||
from py_nextbus.client import NextBusFormatError, NextBusHTTPError
|
from py_nextbus.client import NextBusFormatError, NextBusHTTPError
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components import sensor
|
from homeassistant.components import sensor
|
||||||
from homeassistant.components.nextbus.const import CONF_AGENCY, CONF_ROUTE, DOMAIN
|
from homeassistant.components.nextbus.const import CONF_AGENCY, CONF_ROUTE, DOMAIN
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Fixtrues for the Nextcloud integration tests."""
|
"""Fixtrues for the Nextcloud integration tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
"""Test configuration for Nibe Heat Pump."""
|
"""Test configuration for Nibe Heat Pump."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from contextlib import ExitStack
|
from contextlib import ExitStack
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
|
|
||||||
from freezegun.api import FrozenDateTimeFactory
|
from freezegun.api import FrozenDateTimeFactory
|
||||||
from nibe.exceptions import CoilNotFoundException
|
from nibe.exceptions import CoilNotFoundException
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
"""Fixtures for Notify platform tests."""
|
"""Fixtures for Notify platform tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigFlow
|
from homeassistant.config_entries import ConfigFlow
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""Define fixtures for Notion tests."""
|
"""Define fixtures for Notion tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import json
|
import json
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
|
|
||||||
@ -8,7 +9,6 @@ from aionotion.listener.models import Listener
|
|||||||
from aionotion.sensor.models import Sensor
|
from aionotion.sensor.models import Sensor
|
||||||
from aionotion.user.models import UserPreferences
|
from aionotion.user.models import UserPreferences
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.notion import CONF_REFRESH_TOKEN, CONF_USER_UUID, DOMAIN
|
from homeassistant.components.notion import CONF_REFRESH_TOKEN, CONF_USER_UUID, DOMAIN
|
||||||
from homeassistant.const import CONF_USERNAME
|
from homeassistant.const import CONF_USERNAME
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user