Import Generator from collections.abc (4) (#120917)

This commit is contained in:
Marc Mueller 2024-07-01 11:54:42 +02:00 committed by GitHub
parent ca55986057
commit f11b316dac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
116 changed files with 120 additions and 124 deletions

View file

@ -1,10 +1,10 @@
"""Fixtures for testing qBittorrent component."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
import requests_mock
from typing_extensions import Generator
@pytest.fixture

View file

@ -1,9 +1,9 @@
"""Setup the QNAP tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from typing_extensions import Generator
TEST_HOST = "1.2.3.4"
TEST_USERNAME = "admin"

View file

@ -2,12 +2,12 @@
from __future__ import annotations
from collections.abc import Generator
from ipaddress import ip_address
from unittest.mock import MagicMock, Mock, patch
import pytest
from rabbitair import Mode, Model, Speed
from typing_extensions import Generator
from homeassistant import config_entries
from homeassistant.components import zeroconf

View file

@ -2,10 +2,10 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.radio_browser.const import DOMAIN

View file

@ -2,6 +2,7 @@
from __future__ import annotations
from collections.abc import Generator
from http import HTTPStatus
import json
from typing import Any
@ -9,7 +10,6 @@ from unittest.mock import patch
from pyrainbird import encryption
import pytest
from typing_extensions import Generator
from homeassistant.components.rainbird import DOMAIN
from homeassistant.components.rainbird.const import (

View file

@ -1,11 +1,11 @@
"""Tests for the Rain Bird config flow."""
from collections.abc import AsyncGenerator
from http import HTTPStatus
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
import pytest
from typing_extensions import AsyncGenerator
from homeassistant import config_entries
from homeassistant.components.rainbird import DOMAIN

View file

@ -1,9 +1,9 @@
"""Fixtures for the Rainforest RAVEn tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.core import HomeAssistant

View file

@ -1,11 +1,11 @@
"""Test Rainforest RAVEn config flow."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
from aioraven.device import RAVEnConnectionError
import pytest
from serial.tools.list_ports_common import ListPortInfo
from typing_extensions import Generator
from homeassistant.components.rainforest_raven.const import DOMAIN
from homeassistant.config_entries import SOURCE_USB, SOURCE_USER

View file

@ -2,10 +2,10 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import MagicMock, patch
import pytest
from typing_extensions import Generator
from vehicle import Vehicle
from homeassistant.components.rdw.const import CONF_LICENSE_PLATE, DOMAIN

View file

@ -1,9 +1,9 @@
"""Fixtures for the recorder component tests."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from typing_extensions import Generator
from homeassistant.components import recorder
from homeassistant.core import HomeAssistant

View file

@ -1,12 +1,12 @@
"""The tests for the recorder filter matching the EntityFilter component."""
from collections.abc import AsyncGenerator
import json
from unittest.mock import patch
import pytest
from sqlalchemy import select
from sqlalchemy.engine.row import Row
from typing_extensions import AsyncGenerator
from homeassistant.components.recorder import Recorder, get_instance
from homeassistant.components.recorder.db_schema import EventData, Events, States

View file

@ -3,6 +3,7 @@
from __future__ import annotations
import asyncio
from collections.abc import Generator
from datetime import datetime, timedelta
from pathlib import Path
import sqlite3
@ -14,7 +15,6 @@ from freezegun.api import FrozenDateTimeFactory
import pytest
from sqlalchemy.exc import DatabaseError, OperationalError, SQLAlchemyError
from sqlalchemy.pool import QueuePool
from typing_extensions import Generator
from homeassistant.components import recorder
from homeassistant.components.recorder import (

View file

@ -1,5 +1,6 @@
"""The tests for the recorder filter matching the EntityFilter component."""
from collections.abc import AsyncGenerator
import datetime
import importlib
import sys
@ -12,7 +13,6 @@ import pytest
from sqlalchemy import create_engine, inspect
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import Session
from typing_extensions import AsyncGenerator
from homeassistant.components import recorder
from homeassistant.components.recorder import (

View file

@ -1,5 +1,6 @@
"""Test data purging."""
from collections.abc import Generator
from datetime import datetime, timedelta
import json
import sqlite3
@ -9,7 +10,6 @@ from freezegun import freeze_time
import pytest
from sqlalchemy.exc import DatabaseError, OperationalError
from sqlalchemy.orm.session import Session
from typing_extensions import Generator
from voluptuous.error import MultipleInvalid
from homeassistant.components import recorder

View file

@ -1,5 +1,6 @@
"""Test data purging."""
from collections.abc import Generator
from datetime import datetime, timedelta
import json
import sqlite3
@ -10,7 +11,6 @@ import pytest
from sqlalchemy import text, update
from sqlalchemy.exc import DatabaseError, OperationalError
from sqlalchemy.orm.session import Session
from typing_extensions import Generator
from homeassistant.components import recorder
from homeassistant.components.recorder import migration

View file

@ -1,9 +1,9 @@
"""Pytest module configuration."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture

View file

@ -1,5 +1,6 @@
"""Provide common Renault fixtures."""
from collections.abc import Generator
import contextlib
from types import MappingProxyType
from typing import Any
@ -8,7 +9,6 @@ from unittest.mock import AsyncMock, patch
import pytest
from renault_api.kamereon import exceptions, schemas
from renault_api.renault_account import RenaultAccount
from typing_extensions import Generator
from homeassistant.components.renault.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER, ConfigEntry

View file

@ -1,10 +1,10 @@
"""Tests for Renault binary sensors."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform

View file

@ -1,11 +1,11 @@
"""Tests for Renault sensors."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from renault_api.kamereon import schemas
from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.config_entries import ConfigEntry

View file

@ -1,10 +1,10 @@
"""Tests for Renault sensors."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform

View file

@ -1,12 +1,12 @@
"""Tests for Renault setup process."""
from collections.abc import Generator
from typing import Any
from unittest.mock import Mock, patch
import aiohttp
import pytest
from renault_api.gigya.exceptions import GigyaException, InvalidCredentialsException
from typing_extensions import Generator
from homeassistant.components.renault.const import DOMAIN
from homeassistant.config_entries import ConfigEntry, ConfigEntryState

View file

@ -1,11 +1,11 @@
"""Tests for Renault selects."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from renault_api.kamereon import schemas
from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.components.select import (
ATTR_OPTION,

View file

@ -1,10 +1,10 @@
"""Tests for Renault sensors."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform

View file

@ -1,5 +1,6 @@
"""Tests for Renault sensors."""
from collections.abc import Generator
from datetime import datetime
from unittest.mock import patch
@ -7,7 +8,6 @@ import pytest
from renault_api.exceptions import RenaultException
from renault_api.kamereon import schemas
from renault_api.kamereon.models import ChargeSchedule
from typing_extensions import Generator
from homeassistant.components.renault.const import DOMAIN
from homeassistant.components.renault.services import (

View file

@ -1,9 +1,9 @@
"""Setup the Reolink tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.reolink import const
from homeassistant.components.reolink.config_flow import DEFAULT_PROTOCOL

View file

@ -1,11 +1,11 @@
"""Configuration for Ring tests."""
from collections.abc import Generator
from itertools import chain
from unittest.mock import AsyncMock, Mock, create_autospec, patch
import pytest
import ring_doorbell
from typing_extensions import Generator
from homeassistant.components.ring import DOMAIN
from homeassistant.const import CONF_USERNAME

View file

@ -1,11 +1,11 @@
"""Fixtures for Roku integration tests."""
from collections.abc import Generator
import json
from unittest.mock import MagicMock, patch
import pytest
from rokuecp import Device as RokuDevice
from typing_extensions import Generator
from homeassistant.components.roku.const import DOMAIN
from homeassistant.const import CONF_HOST

View file

@ -2,13 +2,12 @@
from __future__ import annotations
from collections.abc import Awaitable, Callable
from collections.abc import AsyncGenerator, Awaitable, Callable
from typing import Any
from unittest.mock import patch
import pytest
import rtsp_to_webrtc
from typing_extensions import AsyncGenerator
from homeassistant.components import camera
from homeassistant.components.rtsp_to_webrtc import DOMAIN

View file

@ -1,9 +1,9 @@
"""Configuration for Sabnzbd tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture

View file

@ -2,7 +2,7 @@
from __future__ import annotations
from collections.abc import Awaitable, Callable
from collections.abc import Awaitable, Callable, Generator
from datetime import datetime
from socket import AddressFamily # pylint: disable=no-name-in-module
from typing import Any
@ -19,7 +19,6 @@ from samsungtvws.encrypted.remote import SamsungTVEncryptedWSAsyncRemote
from samsungtvws.event import ED_INSTALLED_APP_EVENT
from samsungtvws.exceptions import ResponseError
from samsungtvws.remote import ChannelEmitCommand
from typing_extensions import Generator
from homeassistant.components.samsungtv.const import WEBSOCKET_SSL_PORT
from homeassistant.core import HomeAssistant, ServiceCall

View file

@ -1,5 +1,6 @@
"""Sanix tests configuration."""
from collections.abc import Generator
from datetime import datetime
from unittest.mock import AsyncMock, patch
from zoneinfo import ZoneInfo
@ -16,7 +17,6 @@ from sanix import (
ATTR_API_TIME,
)
from sanix.models import Measurement
from typing_extensions import Generator
from homeassistant.components.sanix.const import CONF_SERIAL_NUMBER, DOMAIN
from homeassistant.const import CONF_TOKEN

View file

@ -1,10 +1,10 @@
"""Common fixtures for the Schlage tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, Mock, create_autospec, patch
from pyschlage.lock import Lock
import pytest
from typing_extensions import Generator
from homeassistant.components.schlage.const import DOMAIN
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME

View file

@ -2,12 +2,12 @@
from __future__ import annotations
from collections.abc import Generator
from typing import Any
from unittest.mock import AsyncMock, patch
import uuid
import pytest
from typing_extensions import Generator
from homeassistant.components.rest.data import DEFAULT_TIMEOUT
from homeassistant.components.rest.schema import DEFAULT_METHOD, DEFAULT_VERIFY_SSL

View file

@ -1,12 +1,12 @@
"""Tests for ScreenLogic integration service calls."""
from collections.abc import AsyncGenerator
from typing import Any
from unittest.mock import DEFAULT, AsyncMock, patch
import pytest
from screenlogicpy import ScreenLogicGateway
from screenlogicpy.device_const.system import COLOR_MODE
from typing_extensions import AsyncGenerator
from homeassistant.components.screenlogic import DOMAIN
from homeassistant.components.screenlogic.const import (

View file

@ -2,10 +2,10 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import patch
import pytest
from typing_extensions import Generator
from homeassistant.components.season.const import DOMAIN, TYPE_ASTRONOMICAL
from homeassistant.const import CONF_TYPE

View file

@ -2,13 +2,13 @@
from __future__ import annotations
from collections.abc import Generator
from datetime import UTC, date, datetime
from decimal import Decimal
from types import ModuleType
from typing import Any
import pytest
from typing_extensions import Generator
from homeassistant.components import sensor
from homeassistant.components.number import NumberDeviceClass

View file

@ -1,10 +1,10 @@
"""Configuration for 17Track tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
from py17track.package import Package
import pytest
from typing_extensions import Generator
from homeassistant.components.seventeentrack.const import (
CONF_SHOW_ARCHIVED,

View file

@ -1,11 +1,11 @@
"""Provide common SFR Box fixtures."""
from collections.abc import Generator
import json
from unittest.mock import AsyncMock, patch
import pytest
from sfrbox_api.models import DslInfo, FtthInfo, SystemInfo, WanInfo
from typing_extensions import Generator
from homeassistant.components.sfr_box.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER, ConfigEntry

View file

@ -1,11 +1,11 @@
"""Test the SFR Box binary sensors."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from sfrbox_api.models import SystemInfo
from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform

View file

@ -1,11 +1,11 @@
"""Test the SFR Box buttons."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from sfrbox_api.exceptions import SFRBoxError
from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.config_entries import ConfigEntry

View file

@ -1,11 +1,11 @@
"""Test the SFR Box diagnostics."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from sfrbox_api.models import SystemInfo
from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant

View file

@ -1,10 +1,10 @@
"""Test the SFR Box setup process."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from sfrbox_api.exceptions import SFRBoxAuthenticationError, SFRBoxError
from typing_extensions import Generator
from homeassistant.components.sfr_box.const import DOMAIN
from homeassistant.config_entries import ConfigEntry, ConfigEntryState

View file

@ -1,10 +1,10 @@
"""Test the SFR Box sensors."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform

View file

@ -1,10 +1,10 @@
"""Define test fixtures for SimpliSafe."""
from collections.abc import AsyncGenerator
from unittest.mock import AsyncMock, Mock, patch
import pytest
from simplipy.system.v3 import SystemV3
from typing_extensions import AsyncGenerator
from homeassistant.components.simplisafe.const import DOMAIN
from homeassistant.const import CONF_CODE, CONF_PASSWORD, CONF_TOKEN, CONF_USERNAME

View file

@ -2,6 +2,7 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, create_autospec, patch
from asyncsleepiq import (
@ -17,7 +18,6 @@ from asyncsleepiq import (
SleepIQSleeper,
)
import pytest
from typing_extensions import Generator
from homeassistant.components.sleepiq import DOMAIN
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME

View file

@ -2,10 +2,10 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.slimproto.const import DOMAIN

View file

@ -1,9 +1,9 @@
"""Test the snapcast config flow."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture

View file

@ -1,5 +1,6 @@
"""Fixtures for Sonarr integration tests."""
from collections.abc import Generator
import json
from unittest.mock import MagicMock, patch
@ -13,7 +14,6 @@ from aiopyarr import (
SystemStatus,
)
import pytest
from typing_extensions import Generator
from homeassistant.components.sonarr.const import (
CONF_BASE_PATH,

View file

@ -2,12 +2,12 @@
from __future__ import annotations
from collections.abc import Generator
import datetime as dt
from unittest.mock import MagicMock, patch
from freezegun.api import FrozenDateTimeFactory
import pytest
from typing_extensions import Generator
from homeassistant.components.srp_energy.const import DOMAIN, PHOENIX_TIME_ZONE
from homeassistant.const import CONF_ID

View file

@ -13,13 +13,13 @@ so that it can inspect the output.
from __future__ import annotations
import asyncio
from collections.abc import Generator
import logging
import threading
from unittest.mock import Mock, patch
from aiohttp import web
import pytest
from typing_extensions import Generator
from homeassistant.components.stream.core import StreamOutput
from homeassistant.components.stream.worker import StreamState

View file

@ -1,10 +1,10 @@
"""Common fixtures for the StreamLabs tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from streamlabswater.streamlabswater import StreamlabsClient
from typing_extensions import Generator
from homeassistant.components.streamlabswater import DOMAIN
from homeassistant.const import CONF_API_KEY

View file

@ -1,12 +1,11 @@
"""Test STT component setup."""
from collections.abc import AsyncIterable
from collections.abc import AsyncIterable, Generator
from http import HTTPStatus
from pathlib import Path
from unittest.mock import AsyncMock
import pytest
from typing_extensions import Generator
from homeassistant.components.stt import (
DOMAIN,

View file

@ -1,9 +1,9 @@
"""Common fixtures for the Suez Water tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture

View file

@ -1,9 +1,9 @@
"""Common fixtures for the swiss_public_transport tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture

View file

@ -2,10 +2,10 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component

View file

@ -1,9 +1,9 @@
"""Common fixtures for the SwitchBot via API tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture

View file

@ -1,9 +1,9 @@
"""Common fixtures and objects for the Switcher integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, Mock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture

View file

@ -1,9 +1,9 @@
"""Configure Synology DSM tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component

View file

@ -2,13 +2,13 @@
from __future__ import annotations
from collections.abc import Generator
import socket
from unittest.mock import AsyncMock, Mock, NonCallableMock, patch
from psutil import NoSuchProcess, Process
from psutil._common import sdiskpart, sdiskusage, shwtemp, snetio, snicaddr, sswap
import pytest
from typing_extensions import Generator
from homeassistant.components.systemmonitor.const import DOMAIN
from homeassistant.components.systemmonitor.coordinator import VirtualMemory

View file

@ -2,11 +2,11 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from tailscale.models import Devices
from typing_extensions import Generator
from homeassistant.components.tailscale.const import CONF_TAILNET, DOMAIN
from homeassistant.const import CONF_API_KEY

View file

@ -2,11 +2,11 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
from gotailwind import TailwindDeviceStatus
import pytest
from typing_extensions import Generator
from homeassistant.components.tailwind.const import DOMAIN
from homeassistant.const import CONF_HOST, CONF_TOKEN

View file

@ -1,5 +1,6 @@
"""Common fixutres with default mocks as well as common test helper methods."""
from collections.abc import Generator
from datetime import datetime
from unittest.mock import AsyncMock, MagicMock, patch
@ -7,7 +8,6 @@ import pytest
from Tami4EdgeAPI.device import Device
from Tami4EdgeAPI.device_metadata import DeviceMetadata
from Tami4EdgeAPI.water_quality import UV, Filter, WaterQuality
from typing_extensions import Generator
from homeassistant.components.tami4.const import CONF_REFRESH_TOKEN, DOMAIN
from homeassistant.core import HomeAssistant

View file

@ -1,9 +1,9 @@
"""Fixtures for Tankerkoenig integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.tankerkoenig import DOMAIN
from homeassistant.const import CONF_SHOW_ON_MAP

View file

@ -1,10 +1,10 @@
"""Fixtures for TechnoVE integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from technove import Station as TechnoVEStation
from typing_extensions import Generator
from homeassistant.components.technove.const import DOMAIN
from homeassistant.const import CONF_HOST

View file

@ -2,13 +2,13 @@
from __future__ import annotations
from collections.abc import Generator
import json
from unittest.mock import AsyncMock, MagicMock, patch
from pytedee_async.bridge import TedeeBridge
from pytedee_async.lock import TedeeLock
import pytest
from typing_extensions import Generator
from homeassistant.components.tedee.const import CONF_LOCAL_ACCESS_TOKEN, DOMAIN
from homeassistant.const import CONF_HOST, CONF_WEBHOOK_ID

View file

@ -1,9 +1,9 @@
"""Fixtures for Time & Date integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture

View file

@ -1,12 +1,12 @@
"""Tests for the todo integration."""
from collections.abc import Generator
import datetime
from typing import Any
from unittest.mock import AsyncMock
import zoneinfo
import pytest
from typing_extensions import Generator
import voluptuous as vol
from homeassistant.components import conversation

View file

@ -1,5 +1,6 @@
"""Common fixtures for the todoist tests."""
from collections.abc import Generator
from http import HTTPStatus
from unittest.mock import AsyncMock, patch
@ -7,7 +8,6 @@ import pytest
from requests.exceptions import HTTPError
from requests.models import Response
from todoist_api_python.models import Collaborator, Due, Label, Project, Task
from typing_extensions import Generator
from homeassistant.components.todoist import DOMAIN
from homeassistant.const import CONF_TOKEN, Platform

View file

@ -1,10 +1,10 @@
"""tplink conftest."""
from collections.abc import Generator
import copy
from unittest.mock import DEFAULT, AsyncMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.tplink import DOMAIN
from homeassistant.core import HomeAssistant

View file

@ -1,6 +1,6 @@
"""Test fixtures for TP-Link Omada integration."""
from collections.abc import AsyncIterable
from collections.abc import AsyncIterable, Generator
import json
from unittest.mock import AsyncMock, MagicMock, patch
@ -17,7 +17,6 @@ from tplink_omada_client.devices import (
OmadaSwitch,
OmadaSwitchPortDetails,
)
from typing_extensions import Generator
from homeassistant.components.tplink_omada.config_flow import CONF_SITE
from homeassistant.components.tplink_omada.const import DOMAIN

View file

@ -1,10 +1,10 @@
"""Common fixtures for the Traccar Server tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from pytraccar import ApiClient, SubscriptionStatus
from typing_extensions import Generator
from homeassistant.components.traccar_server.const import (
CONF_CUSTOM_ATTRIBUTES,

View file

@ -1,11 +1,11 @@
"""Test the Traccar Server config flow."""
from collections.abc import Generator
from typing import Any
from unittest.mock import AsyncMock
import pytest
from pytraccar import TraccarException
from typing_extensions import Generator
from homeassistant import config_entries
from homeassistant.components.traccar.device_tracker import PLATFORM_SCHEMA

View file

@ -1,9 +1,9 @@
"""Test Traccar Server diagnostics."""
from collections.abc import Generator
from unittest.mock import AsyncMock
from syrupy import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr, entity_registry as er

View file

@ -1,12 +1,12 @@
"""Common fixtures for the Tractive tests."""
from collections.abc import Generator
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
from aiotractive.trackable_object import TrackableObject
from aiotractive.tracker import Tracker
import pytest
from typing_extensions import Generator
from homeassistant.components.tractive.const import DOMAIN, SERVER_UNAVAILABLE
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD

View file

@ -2,7 +2,7 @@
from __future__ import annotations
from collections.abc import Callable
from collections.abc import Callable, Generator
import json
from typing import Any
from unittest.mock import AsyncMock, MagicMock, patch
@ -12,7 +12,6 @@ from pytradfri.command import Command
from pytradfri.const import ATTR_FIRMWARE_VERSION, ATTR_GATEWAY_ID
from pytradfri.device import Device
from pytradfri.gateway import Gateway
from typing_extensions import Generator
from homeassistant.components.tradfri.const import DOMAIN

View file

@ -2,13 +2,13 @@
from __future__ import annotations
from collections.abc import Generator
from http import HTTPStatus
from pathlib import Path
from typing import Any
from unittest.mock import MagicMock, patch
import pytest
from typing_extensions import Generator
import voluptuous as vol
from homeassistant.components import media_source

View file

@ -3,11 +3,11 @@
From http://doc.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures
"""
from collections.abc import Generator
from pathlib import Path
from unittest.mock import MagicMock
import pytest
from typing_extensions import Generator
from homeassistant.config import async_process_ha_core_config
from homeassistant.config_entries import ConfigFlow

View file

@ -2,10 +2,10 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.tuya.const import CONF_APP_TYPE, CONF_USER_CODE, DOMAIN

View file

@ -2,12 +2,12 @@
from __future__ import annotations
from collections.abc import Generator
from datetime import date
from unittest.mock import MagicMock, patch
import pytest
from twentemilieu import WasteType
from typing_extensions import Generator
from homeassistant.components.twentemilieu.const import (
CONF_HOUSE_LETTER,

View file

@ -1,11 +1,11 @@
"""Configure tests for the Twitch integration."""
from collections.abc import Generator
import time
from unittest.mock import AsyncMock, patch
import pytest
from twitchAPI.object.api import FollowedChannel, Stream, TwitchUser, UserSubscription
from typing_extensions import Generator
from homeassistant.components.application_credentials import (
ClientCredential,

View file

@ -1,10 +1,10 @@
"""Test the Ukraine Alarm config flow."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
from aiohttp import ClientConnectionError, ClientError, ClientResponseError, RequestInfo
import pytest
from typing_extensions import Generator
from yarl import URL
from homeassistant import config_entries

View file

@ -3,7 +3,7 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
from collections.abc import Callable, Generator
from datetime import timedelta
from types import MappingProxyType
from typing import Any
@ -12,7 +12,6 @@ from unittest.mock import AsyncMock, patch
from aiounifi.models.message import MessageKey
import orjson
import pytest
from typing_extensions import Generator
from homeassistant.components.unifi import STORAGE_KEY, STORAGE_VERSION
from homeassistant.components.unifi.const import CONF_SITE_ID, DOMAIN as UNIFI_DOMAIN

View file

@ -1,9 +1,9 @@
"""The tests for the Update component."""
from collections.abc import Generator
from unittest.mock import MagicMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.update import (
ATTR_BACKUP,

View file

@ -2,10 +2,10 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import patch
import pytest
from typing_extensions import Generator
from homeassistant.components.uptime.const import DOMAIN
from homeassistant.core import HomeAssistant

View file

@ -1,10 +1,10 @@
"""Common fixtures for the V2C tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from pytrydan.models.trydan import TrydanData
from typing_extensions import Generator
from homeassistant.components.v2c.const import DOMAIN
from homeassistant.const import CONF_HOST

View file

@ -1,7 +1,8 @@
"""Fixtures for Vacuum platform tests."""
from collections.abc import Generator
import pytest
from typing_extensions import Generator
from homeassistant.config_entries import ConfigFlow
from homeassistant.core import HomeAssistant

View file

@ -1,8 +1,9 @@
"""The tests for Valve."""
from collections.abc import Generator
import pytest
from syrupy.assertion import SnapshotAssertion
from typing_extensions import Generator
from homeassistant.components.valve import (
DOMAIN,

View file

@ -1,9 +1,9 @@
"""Fixtures for the Velbus tests."""
from collections.abc import Generator
from unittest.mock import MagicMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.velbus.const import DOMAIN
from homeassistant.config_entries import ConfigEntry

View file

@ -1,10 +1,10 @@
"""Tests for the Velbus config flow."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
import serial.tools.list_ports
from typing_extensions import Generator
from velbusaio.exceptions import VelbusConnectionFailed
from homeassistant.components import usb

View file

@ -1,9 +1,9 @@
"""Configuration for Velux tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture

View file

@ -2,10 +2,10 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.verisure.const import CONF_GIID, DOMAIN
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD

View file

@ -2,13 +2,13 @@
from __future__ import annotations
from collections.abc import AsyncGenerator, Generator
from dataclasses import dataclass
from unittest.mock import AsyncMock, Mock, patch
import pytest
from PyViCare.PyViCareDeviceConfig import PyViCareDeviceConfig
from PyViCare.PyViCareService import ViCareDeviceAccessor, readFeature
from typing_extensions import AsyncGenerator, Generator
from homeassistant.components.vicare.const import DOMAIN
from homeassistant.core import HomeAssistant

View file

@ -1,9 +1,9 @@
"""Vilfo tests conftest."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.vilfo import DOMAIN
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_HOST

View file

@ -2,10 +2,10 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture

View file

@ -1,14 +1,13 @@
"""Test wake_word component setup."""
import asyncio
from collections.abc import AsyncIterable
from collections.abc import AsyncIterable, Generator
from functools import partial
from pathlib import Path
from unittest.mock import patch
from freezegun import freeze_time
import pytest
from typing_extensions import Generator
from homeassistant.components import wake_word
from homeassistant.config_entries import ConfigEntry, ConfigEntryState, ConfigFlow

View file

@ -1,9 +1,9 @@
"""Common fixtures for the World Air Quality Index (WAQI) tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
from homeassistant.components.waqi.const import CONF_STATION_NUMBER, DOMAIN
from homeassistant.const import CONF_API_KEY

View file

@ -1,7 +1,8 @@
"""Fixtures for water heater platform tests."""
from collections.abc import Generator
import pytest
from typing_extensions import Generator
from homeassistant.config_entries import ConfigFlow
from homeassistant.core import HomeAssistant

View file

@ -1,7 +1,8 @@
"""Fixtures for Weather platform tests."""
from collections.abc import Generator
import pytest
from typing_extensions import Generator
from homeassistant.config_entries import ConfigFlow
from homeassistant.core import HomeAssistant

View file

@ -1,12 +1,12 @@
"""Fixtures for Weatherflow integration tests."""
import asyncio
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from pyweatherflowudp.client import EVENT_DEVICE_DISCOVERED
from pyweatherflowudp.device import WeatherFlowDevice
from typing_extensions import Generator
from homeassistant.components.weatherflow.const import DOMAIN

View file

@ -1,10 +1,10 @@
"""Common fixtures for the WeatherflowCloud tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, Mock, patch
from aiohttp import ClientResponseError
import pytest
from typing_extensions import Generator
@pytest.fixture

Some files were not shown because too many files have changed in this diff Show more