repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/test_diagnostics.py | tests/components/bond/test_diagnostics.py | """Test bond diagnostics."""
from homeassistant.components.fan import DOMAIN as FAN_DOMAIN
from homeassistant.core import HomeAssistant
from .common import ceiling_fan_with_breeze, setup_platform
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerator... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/common.py | tests/components/bond/common.py | """Common methods used across tests for Bond."""
from __future__ import annotations
from contextlib import nullcontext
from datetime import timedelta
from typing import Any
from unittest.mock import MagicMock, patch
from aiohttp.client_exceptions import ClientResponseError
from bond_async import DeviceType
from hom... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/test_switch.py | tests/components/bond/test_switch.py | """Tests for the Bond switch device."""
from datetime import timedelta
from bond_async import Action, DeviceType
import pytest
from homeassistant.components.bond.const import (
ATTR_POWER_STATE,
DOMAIN,
SERVICE_SET_POWER_TRACKED_STATE,
)
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/test_fan.py | tests/components/bond/test_fan.py | """Tests for the Bond fan device."""
from __future__ import annotations
from datetime import timedelta
from unittest.mock import call
from bond_async import Action, DeviceType, Direction
import pytest
from homeassistant import core
from homeassistant.components import fan
from homeassistant.components.bond.const im... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/test_entity.py | tests/components/bond/test_entity.py | """Tests for the Bond entities."""
from datetime import timedelta
from unittest.mock import patch
from bond_async import BPUPSubscriptions, DeviceType
from bond_async.bpup import BPUP_ALIVE_TIMEOUT
from homeassistant.components import fan
from homeassistant.components.fan import DOMAIN as FAN_DOMAIN
from homeassista... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/test_config_flow.py | tests/components/bond/test_config_flow.py | """Test the Bond config flow."""
from __future__ import annotations
from http import HTTPStatus
from ipaddress import ip_address
from typing import Any
from unittest.mock import MagicMock, Mock, patch
from aiohttp import ClientConnectionError, ClientResponseError
from homeassistant import config_entries
from homeas... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/conftest.py | tests/components/bond/conftest.py | """bond conftest."""
from tests.components.light.conftest import mock_light_profiles # noqa: F401
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/__init__.py | tests/components/bond/__init__.py | """Tests for the Bond integration."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/test_light.py | tests/components/bond/test_light.py | """Tests for the Bond light device."""
from datetime import timedelta
from bond_async import Action, DeviceType
import pytest
from homeassistant.components.bond.const import (
ATTR_POWER_STATE,
DOMAIN,
SERVICE_SET_LIGHT_BRIGHTNESS_TRACKED_STATE,
SERVICE_SET_LIGHT_POWER_TRACKED_STATE,
)
from homeassis... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | true |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/test_init.py | tests/components/bond/test_init.py | """Tests for the Bond module."""
from unittest.mock import MagicMock, Mock
from aiohttp import ClientConnectionError, ClientResponseError
from bond_async import DeviceType
import pytest
from homeassistant.components.bond import DOMAIN, BondData
from homeassistant.components.fan import DOMAIN as FAN_DOMAIN
from homea... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/bond/test_cover.py | tests/components/bond/test_cover.py | """Tests for the Bond cover device."""
from datetime import timedelta
from bond_async import Action, DeviceType
from homeassistant.components.cover import (
ATTR_CURRENT_POSITION,
ATTR_POSITION,
DOMAIN as COVER_DOMAIN,
CoverState,
)
from homeassistant.const import (
ATTR_ENTITY_ID,
SERVICE_CL... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sanix/test_sensor.py | tests/components/sanix/test_sensor.py | """Test the Sanix sensor module."""
from unittest.mock import AsyncMock, patch
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from . import setup_integration
f... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sanix/test_config_flow.py | tests/components/sanix/test_config_flow.py | """Define tests for the Sanix config flow."""
from unittest.mock import MagicMock
import pytest
from sanix.exceptions import SanixException, SanixInvalidAuthException
from homeassistant.components.sanix.const import (
CONF_SERIAL_NUMBER,
DOMAIN,
MANUFACTURER,
)
from homeassistant.config_entries import SO... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sanix/conftest.py | tests/components/sanix/conftest.py | """Sanix tests configuration."""
from collections.abc import Generator
from datetime import datetime
from unittest.mock import AsyncMock, patch
from zoneinfo import ZoneInfo
import pytest
from sanix import (
ATTR_API_BATTERY,
ATTR_API_DEVICE_NO,
ATTR_API_DISTANCE,
ATTR_API_FILL_PERC,
ATTR_API_SERV... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sanix/__init__.py | tests/components/sanix/__init__.py | """Tests for Sanix."""
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
async def setup_integration(hass: HomeAssistant, config_entry: MockConfigEntry) -> None:
"""Fixture for setting up the component."""
config_entry.add_to_hass(hass)
assert await hass.config_entri... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sanix/test_init.py | tests/components/sanix/test_init.py | """Test the Sanix init module."""
from __future__ import annotations
from unittest.mock import AsyncMock
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from . import setup_integration
from tests.common import MockConfigEntry
async def test_load_unload_entry... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/adguard/test_service.py | tests/components/adguard/test_service.py | """Tests for the AdGuard Home sensor entities."""
from collections.abc import Callable
from typing import Any
from unittest.mock import AsyncMock, patch
import pytest
from homeassistant.components.adguard.const import (
DOMAIN,
SERVICE_ADD_URL,
SERVICE_DISABLE_URL,
SERVICE_ENABLE_URL,
SERVICE_REF... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/adguard/test_sensor.py | tests/components/adguard/test_sensor.py | """Tests for the AdGuard Home sensor entities."""
from unittest.mock import AsyncMock, patch
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from . import setup_... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/adguard/test_switch.py | tests/components/adguard/test_switch.py | """Tests for the AdGuard Home switch entity."""
from collections.abc import Callable
import logging
from typing import Any
from unittest.mock import AsyncMock, patch
from adguardhome import AdGuardHomeError
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.switch import SERVI... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/adguard/test_config_flow.py | tests/components/adguard/test_config_flow.py | """Tests for the AdGuard Home config flow."""
import aiohttp
from homeassistant import config_entries
from homeassistant.components.adguard.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import (
CONF_HOST,
CONF_PASSWORD,
CONF_PORT,
CONF_SSL,
CONF... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/adguard/conftest.py | tests/components/adguard/conftest.py | """Common fixtures for the adguard tests."""
from unittest.mock import AsyncMock
from adguardhome import AdGuardHome
from adguardhome.filtering import AdGuardHomeFiltering
from adguardhome.parental import AdGuardHomeParental
from adguardhome.querylog import AdGuardHomeQueryLog
from adguardhome.safebrowsing import AdG... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/adguard/__init__.py | tests/components/adguard/__init__.py | """Tests for the AdGuard Home integration."""
from collections.abc import AsyncGenerator
from unittest.mock import patch
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
async def setup_integration(
hass: HomeAssistant,
config_entry: MockConfigEntry,
adguard_mock: A... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/adguard/test_update.py | tests/components/adguard/test_update.py | """Tests for the AdGuard Home update entity."""
from unittest.mock import AsyncMock, patch
from adguardhome import AdGuardHomeError
from adguardhome.update import AdGuardHomeAvailableUpdate
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core i... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/adguard/test_init.py | tests/components/adguard/test_init.py | """Tests for the AdGuard Home."""
from unittest.mock import AsyncMock, patch
from adguardhome import AdGuardHomeConnectionError
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from . import setup_integration
from tests.common import MockConfigEntry
async def... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/folder/test_sensor.py | tests/components/folder/test_sensor.py | """The tests for the folder sensor."""
import os
from homeassistant.components.folder.sensor import CONF_FOLDER_PATHS
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
CWD = os.path.join(os.path.dirname(__file__))
TEST_FOLDER = "test_folder"
TEST_DIR = os.path.join(CW... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/folder/__init__.py | tests/components/folder/__init__.py | """Tests for the folder component."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/moehlenhoff_alpha2/test_button.py | tests/components/moehlenhoff_alpha2/test_button.py | """Tests for the Moehlenhoff Alpha2 buttons."""
from unittest.mock import patch
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from . import init_integration
from tests.comm... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/moehlenhoff_alpha2/test_binary_sensor.py | tests/components/moehlenhoff_alpha2/test_binary_sensor.py | """Tests for the Moehlenhoff Alpha2 binary sensors."""
from unittest.mock import patch
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from . import init_integration
from tes... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/moehlenhoff_alpha2/test_sensor.py | tests/components/moehlenhoff_alpha2/test_sensor.py | """Tests for the Moehlenhoff Alpha2 sensors."""
from unittest.mock import patch
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from . import init_integration
from tests.comm... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/moehlenhoff_alpha2/test_climate.py | tests/components/moehlenhoff_alpha2/test_climate.py | """Tests for the Moehlenhoff Alpha2 climate."""
from unittest.mock import patch
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from . import init_integration
from tests.comm... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/moehlenhoff_alpha2/test_config_flow.py | tests/components/moehlenhoff_alpha2/test_config_flow.py | """Test the moehlenhoff_alpha2 config flow."""
from functools import partialmethod
from unittest.mock import patch
from homeassistant import config_entries
from homeassistant.components.moehlenhoff_alpha2.const import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowRe... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/moehlenhoff_alpha2/__init__.py | tests/components/moehlenhoff_alpha2/__init__.py | """Tests for the moehlenhoff_alpha2 integration."""
from functools import partialmethod
from unittest.mock import patch
from moehlenhoff_alpha2 import Alpha2Base
import xmltodict
from homeassistant.components.moehlenhoff_alpha2.const import DOMAIN
from homeassistant.const import CONF_HOST
from homeassistant.core imp... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/fints/__init__.py | tests/components/fints/__init__.py | """Tests for FinTS component."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/fints/test_client.py | tests/components/fints/test_client.py | """Tests for the FinTS client."""
from fints.client import BankIdentifier, FinTSOperations
import pytest
from homeassistant.components.fints.sensor import (
BankCredentials,
FinTsClient,
SEPAAccount,
)
BANK_INFORMATION = {
"bank_identifier": BankIdentifier(country_identifier="280", bank_code="5001051... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/test_button.py | tests/components/volvo/test_button.py | """Test Volvo buttons."""
from collections.abc import Awaitable, Callable
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from volvocarsapi.api import VolvoCarsApi
from volvocarsapi.models import VolvoApiException, VolvoCarsCommandResult
from homeassistant.components.butt... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/test_diagnostics.py | tests/components/volvo/test_diagnostics.py | """Test Volvo diagnostics."""
from collections.abc import Awaitable, Callable
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import CONF_TOKEN
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
from tests.components.diagnostics import get_dia... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/test_binary_sensor.py | tests/components/volvo/test_binary_sensor.py | """Test Volvo binary sensors."""
from collections.abc import Awaitable, Callable
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.volvo.const import DOMAIN
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
f... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/test_sensor.py | tests/components/volvo/test_sensor.py | """Test Volvo sensors."""
from collections.abc import Awaitable, Callable
from unittest.mock import AsyncMock, patch
import pytest
from syrupy.assertion import SnapshotAssertion
from volvocarsapi.api import VolvoCarsApi
from volvocarsapi.models import (
VolvoCarsErrorResult,
VolvoCarsValue,
VolvoCarsValue... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/test_config_flow.py | tests/components/volvo/test_config_flow.py | """Test the Volvo config flow."""
from collections.abc import AsyncGenerator
from unittest.mock import AsyncMock, patch
import pytest
from volvocarsapi.api import VolvoCarsApi
from volvocarsapi.auth import AUTHORIZE_URL, TOKEN_URL
from volvocarsapi.models import VolvoApiException, VolvoCarsVehicle
from volvocarsapi.s... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/const.py | tests/components/volvo/const.py | """Define const for Volvo unit tests."""
CLIENT_ID = "1234"
CLIENT_SECRET = "5678"
DEFAULT_API_KEY = "abcdef0123456879abcdef"
DEFAULT_MODEL = "xc40_electric_2024"
DEFAULT_VIN = "YV1ABCDEFG1234567"
MOCK_ACCESS_TOKEN = "mock-access-token"
REDIRECT_URI = "https://example.com/auth/external/callback"
SERVER_TOKEN_RESPO... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/conftest.py | tests/components/volvo/conftest.py | """Define fixtures for Volvo unit tests."""
from collections.abc import AsyncGenerator, Awaitable, Callable, Generator
from dataclasses import dataclass
from unittest.mock import AsyncMock, patch
import pytest
from volvocarsapi.api import VolvoCarsApi
from volvocarsapi.auth import TOKEN_URL
from volvocarsapi.models i... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/test_lock.py | tests/components/volvo/test_lock.py | """Test Volvo locks."""
from collections.abc import Awaitable, Callable
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from volvocarsapi.api import VolvoCarsApi
from volvocarsapi.models import VolvoApiException, VolvoCarsCommandResult
from homeassistant.components.lock i... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/__init__.py | tests/components/volvo/__init__.py | """Tests for the Volvo integration."""
from typing import Any
from unittest.mock import AsyncMock
from volvocarsapi.models import VolvoCarsValueField
from homeassistant.components.volvo.const import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.util.json import JsonObjectType, json_loads_obj... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/test_device_tracker.py | tests/components/volvo/test_device_tracker.py | """Test Volvo device tracker."""
from collections.abc import Awaitable, Callable
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/test_coordinator.py | tests/components/volvo/test_coordinator.py | """Test Volvo coordinator."""
from collections.abc import Awaitable, Callable
from datetime import timedelta
from unittest.mock import AsyncMock
from freezegun.api import FrozenDateTimeFactory
import pytest
from volvocarsapi.api import VolvoCarsApi
from volvocarsapi.models import (
VolvoApiException,
VolvoAut... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/volvo/test_init.py | tests/components/volvo/test_init.py | """Test Volvo init."""
from collections.abc import Awaitable, Callable
from http import HTTPStatus
from unittest.mock import AsyncMock, patch
import pytest
from volvocarsapi.api import VolvoCarsApi
from volvocarsapi.auth import TOKEN_URL
from volvocarsapi.models import VolvoAuthException
from homeassistant.component... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/diagnostics/test_util.py | tests/components/diagnostics/test_util.py | """Test Diagnostics utils."""
from homeassistant.components.diagnostics import REDACTED, async_redact_data
def test_redact() -> None:
"""Test the async_redact_data helper."""
data = {
"key1": "value1",
"key2": ["value2_a", "value2_b"],
"key3": [["value_3a", "value_3b"], ["value_3c", "... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/diagnostics/__init__.py | tests/components/diagnostics/__init__.py | """Tests for the Diagnostics integration."""
from http import HTTPStatus
from typing import cast
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntry
from homeassistant.setup import async_setup_component
from ho... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/diagnostics/test_init.py | tests/components/diagnostics/test_init.py | """Test the Diagnostics integration."""
from datetime import datetime
from http import HTTPStatus
from unittest.mock import AsyncMock, Mock, patch
from freezegun import freeze_time
import pytest
from homeassistant.components.websocket_api import TYPE_RESULT
from homeassistant.core import HomeAssistant
from homeassis... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/oralb/test_sensor.py | tests/components/oralb/test_sensor.py | """Test the OralB sensors."""
from datetime import timedelta
import time
import pytest
from homeassistant.components.bluetooth import (
FALLBACK_MAXIMUM_STALE_ADVERTISEMENT_SECONDS,
async_address_present,
)
from homeassistant.components.oralb.const import DOMAIN
from homeassistant.const import ATTR_ASSUMED_S... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/oralb/test_config_flow.py | tests/components/oralb/test_config_flow.py | """Test the OralB config flow."""
from unittest.mock import patch
from homeassistant import config_entries
from homeassistant.components.oralb.const import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType
from . import NOT_ORALB_SERVICE_INFO, ORALB_IO_SERIE... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/oralb/conftest.py | tests/components/oralb/conftest.py | """OralB session fixtures."""
from collections.abc import Generator
from typing import Any
from unittest import mock
import pytest
class MockServices:
"""Mock GATTServicesCollection."""
def get_characteristic(self, key: str) -> str:
"""Mock GATTServicesCollection.get_characteristic."""
retu... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/oralb/__init__.py | tests/components/oralb/__init__.py | """Tests for the OralB integration."""
from home_assistant_bluetooth import BluetoothServiceInfoBleak
from homeassistant.helpers.service_info.bluetooth import BluetoothServiceInfo
from tests.components.bluetooth import generate_advertisement_data, generate_ble_device
NOT_ORALB_SERVICE_INFO = BluetoothServiceInfo(
... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/youless/test_sensor.py | tests/components/youless/test_sensor.py | """Test the sensor classes for youless."""
from unittest.mock import patch
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from . import init_component
from tests.common impo... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/youless/test_config_flows.py | tests/components/youless/test_config_flows.py | """Test the youless config flow."""
from unittest.mock import MagicMock, patch
from urllib.error import URLError
from homeassistant.components.youless import DOMAIN
from homeassistant.config_entries import SOURCE_USER
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultTyp... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/youless/__init__.py | tests/components/youless/__init__.py | """Tests for the youless component."""
import requests_mock
from homeassistant.components import youless
from homeassistant.const import CONF_DEVICE, CONF_HOST
from homeassistant.core import HomeAssistant
from tests.common import (
MockConfigEntry,
async_load_json_array_fixture,
async_load_json_object_fi... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/youless/test_init.py | tests/components/youless/test_init.py | """Test the setup of the Youless integration."""
from homeassistant import setup
from homeassistant.components import youless
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from . import init_component
async def test_async_setup_entry(hass: HomeAssistant) -> N... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/ambient_station/test_diagnostics.py | tests/components/ambient_station/test_diagnostics.py | """Test Ambient PWS diagnostics."""
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.components.ambient_station import AmbientStationConfigEntry
from homeassistant.core import HomeAssistant
from tests.components.diagnostics import get_diagnostics_for_config_entry
fro... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/ambient_station/test_config_flow.py | tests/components/ambient_station/test_config_flow.py | """Define tests for the Ambient PWS config flow."""
from unittest.mock import AsyncMock, patch
from aioambient.errors import AmbientError
import pytest
from homeassistant.components.ambient_station.const import CONF_APP_KEY, DOMAIN
from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import ... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/ambient_station/conftest.py | tests/components/ambient_station/conftest.py | """Define test fixtures for Ambient PWS."""
from collections.abc import Generator
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
import pytest
from homeassistant.components.ambient_station.const import CONF_APP_KEY, DOMAIN
from homeassistant.const import CONF_API_KEY
from homeassistant.core ... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/ambient_station/__init__.py | tests/components/ambient_station/__init__.py | """Define tests for the Ambient PWS component."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/tailwind/test_button.py | tests/components/tailwind/test_button.py | """Tests for button entities provided by the Tailwind integration."""
from unittest.mock import MagicMock
from gotailwind import TailwindError
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.components.... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/tailwind/test_diagnostics.py | tests/components/tailwind/test_diagnostics.py | """Tests for diagnostics provided by the Tailwind integration."""
from syrupy.assertion import SnapshotAssertion
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenera... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/tailwind/test_binary_sensor.py | tests/components/tailwind/test_binary_sensor.py | """Tests for binary sensor entities provided by the Tailwind integration."""
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr, entity_registry as er
pytestmark = pytest.mark.usefixtures("init_integration"... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/tailwind/test_config_flow.py | tests/components/tailwind/test_config_flow.py | """Configuration flow tests for the Tailwind integration."""
from ipaddress import ip_address
from unittest.mock import MagicMock
from gotailwind import (
TailwindAuthenticationError,
TailwindConnectionError,
TailwindUnsupportedFirmwareVersionError,
)
import pytest
from syrupy.assertion import SnapshotAss... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/tailwind/conftest.py | tests/components/tailwind/conftest.py | """Fixtures for the Tailwind integration tests."""
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import MagicMock, patch
from gotailwind import TailwindDeviceStatus
import pytest
from homeassistant.components.tailwind.const import DOMAIN
from homeassistant.const import ... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/tailwind/__init__.py | tests/components/tailwind/__init__.py | """Integration tests for the Tailwind integration."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/tailwind/test_number.py | tests/components/tailwind/test_number.py | """Tests for number entities provided by the Tailwind integration."""
from unittest.mock import MagicMock
from gotailwind import TailwindError
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components import number
from homeassistant.components.number import ATTR_VALUE, SERVICE_SET_V... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/tailwind/test_init.py | tests/components/tailwind/test_init.py | """Integration tests for the Tailwind integration."""
from unittest.mock import MagicMock
from gotailwind import TailwindAuthenticationError, TailwindConnectionError
from homeassistant.components.tailwind.const import DOMAIN
from homeassistant.config_entries import SOURCE_REAUTH, ConfigEntryState
from homeassistant.... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/tailwind/test_cover.py | tests/components/tailwind/test_cover.py | """Tests for cover entities provided by the Tailwind integration."""
from unittest.mock import ANY, MagicMock
from gotailwind import (
TailwindDoorAlreadyInStateError,
TailwindDoorDisabledError,
TailwindDoorLockedOutError,
TailwindDoorOperationCommand,
TailwindError,
)
import pytest
from syrupy.as... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/ialarm/test_config_flow.py | tests/components/ialarm/test_config_flow.py | """Test the Antifurto365 iAlarm config flow."""
from unittest.mock import patch
from homeassistant import config_entries
from homeassistant.components.ialarm.const import DOMAIN
from homeassistant.const import CONF_HOST, CONF_PORT
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import ... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/ialarm/__init__.py | tests/components/ialarm/__init__.py | """Tests for the Antifurto365 iAlarm integration."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/ialarm/test_init.py | tests/components/ialarm/test_init.py | """Test the Antifurto365 iAlarm init."""
from unittest.mock import Mock, patch
from uuid import uuid4
import pytest
from homeassistant.components.ialarm.const import DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.const import CONF_HOST, CONF_PORT
from homeassistant.core import Ho... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/webmin/test_diagnostics.py | tests/components/webmin/test_diagnostics.py | """Tests for the diagnostics data provided by the Webmin integration."""
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.core import HomeAssistant
from .conftest import async_init_integration
from tests.components.diagnostics import get_diagnostics_for_config_entry... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/webmin/test_sensor.py | tests/components/webmin/test_sensor.py | """Test cases for the Webmin sensors."""
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .conftest import async_init_integration
from tests.common import snapshot_platform
@pytest.mark.usefixture... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/webmin/test_config_flow.py | tests/components/webmin/test_config_flow.py | """Test the Webmin config flow."""
from __future__ import annotations
from http import HTTPStatus
from unittest.mock import AsyncMock, patch
from xmlrpc.client import Fault
from aiohttp.client_exceptions import ClientConnectionError, ClientResponseError
import pytest
from homeassistant import config_entries
from ho... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/webmin/conftest.py | tests/components/webmin/conftest.py | """Fixtures for Webmin integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from homeassistant.components.webmin.const import DEFAULT_PORT, DOMAIN
from homeassistant.const import (
CONF_HOST,
CONF_PASSWORD,
CONF_PORT,
CONF_SSL,
CONF_... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/webmin/__init__.py | tests/components/webmin/__init__.py | """Tests for the Webmin integration."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/webmin/test_init.py | tests/components/webmin/test_init.py | """Tests for the Webmin integration."""
from homeassistant.components.webmin.const import DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from .conftest import async_init_integration
async def test_unload_entry(hass: HomeAssistant) -> None:
"""Test s... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/autarco/test_diagnostics.py | tests/components/autarco/test_diagnostics.py | """Test Autarco diagnostics."""
from unittest.mock import AsyncMock
from syrupy.assertion import SnapshotAssertion
from homeassistant.core import HomeAssistant
from . import setup_integration
from tests.common import MockConfigEntry
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tes... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/autarco/test_sensor.py | tests/components/autarco/test_sensor.py | """Test the sensor provided by the Autarco integration."""
from datetime import timedelta
from unittest.mock import AsyncMock, MagicMock, patch
from autarco import AutarcoConnectionError
from freezegun.api import FrozenDateTimeFactory
from syrupy.assertion import SnapshotAssertion
from homeassistant.config_entries i... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/autarco/test_config_flow.py | tests/components/autarco/test_config_flow.py | """Test the Autarco config flow."""
from unittest.mock import AsyncMock, patch
from autarco import AutarcoAuthenticationError, AutarcoConnectionError
import pytest
from homeassistant.components.autarco.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import CONF_EMAIL... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/autarco/conftest.py | tests/components/autarco/conftest.py | """Common fixtures for the Autarco tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
from autarco import AccountSite, Battery, Inverter, Solar
import pytest
from homeassistant.components.autarco.const import DOMAIN
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
fr... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/autarco/__init__.py | tests/components/autarco/__init__.py | """Tests for the Autarco integration."""
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
async def setup_integration(hass: HomeAssistant, config_entry: MockConfigEntry) -> None:
"""Fixture for setting up the integration."""
config_entry.add_to_hass(hass)
await hass... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/autarco/test_init.py | tests/components/autarco/test_init.py | """Test the Autarco init module."""
from __future__ import annotations
from unittest.mock import AsyncMock
from autarco import AutarcoAuthenticationError, AutarcoConnectionError
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from . import setup_integration
f... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/fail2ban/test_sensor.py | tests/components/fail2ban/test_sensor.py | """The tests for local file sensor platform."""
from unittest.mock import Mock, mock_open, patch
from homeassistant.components.fail2ban.sensor import (
STATE_ALL_BANS,
STATE_CURRENT_BANS,
BanLogParser,
BanSensor,
)
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setu... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/fail2ban/__init__.py | tests/components/fail2ban/__init__.py | """Tests for the fail2ban component."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/nasweb/test_config_flow.py | tests/components/nasweb/test_config_flow.py | """Test the NASweb config flow."""
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from webio_api.api_client import AuthError
from homeassistant import config_entries
from homeassistant.components.nasweb.const import DOMAIN
from homeassistant.config_entries import ConfigFlowResult
from homeassist... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/nasweb/conftest.py | tests/components/nasweb/conftest.py | """Common fixtures for the NASweb tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
@pytest.fixture
def mock_setup_entry() -> Generator[AsyncMock]:
"""Override async_setup_entry."""
with patch(
"homeassistant.components.nasweb.async_s... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/nasweb/__init__.py | tests/components/nasweb/__init__.py | """Tests for the NASweb integration."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/axis/test_diagnostics.py | tests/components/axis/test_diagnostics.py | """Test Axis diagnostics."""
import pytest
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.core import HomeAssistant
from .const import API_DISCOVERY_BASIC_DEVICE_INFO
from tests.common import MockConfigEntry
from tests.components.diagnostics import get_diagnostics... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/axis/test_binary_sensor.py | tests/components/axis/test_binary_sensor.py | """Axis binary sensor platform tests."""
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassist... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/axis/test_switch.py | tests/components/axis/test_switch.py | """Axis switch platform tests."""
from unittest.mock import patch
from axis.models.api import CONTEXT
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
from homeassistant.const import (
ATTR_ENTITY_ID,
SERVICE_TURN_OFF,
SERVIC... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/axis/test_config_flow.py | tests/components/axis/test_config_flow.py | """Test Axis config flow."""
from collections.abc import Callable
from ipaddress import ip_address
from unittest.mock import patch
import pytest
from homeassistant.components.axis import config_flow
from homeassistant.components.axis.const import (
CONF_STREAM_PROFILE,
CONF_VIDEO_SOURCE,
DEFAULT_STREAM_P... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/axis/const.py | tests/components/axis/const.py | """Constants for Axis integration tests."""
from axis.models.api import CONTEXT
MAC = "00408C123456"
FORMATTED_MAC = "00:40:8c:12:34:56"
MODEL = "A1234"
NAME = "home"
DEFAULT_HOST = "1.2.3.4"
API_DISCOVERY_RESPONSE = {
"method": "getApiList",
"apiVersion": "1.0",
"context": CONTEXT,
"data": {
... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/axis/conftest.py | tests/components/axis/conftest.py | """Axis conftest."""
from __future__ import annotations
from collections.abc import Callable, Coroutine, Generator
from copy import deepcopy
from types import MappingProxyType
from typing import Any, Protocol
from unittest.mock import AsyncMock, patch
from axis.rtsp import Signal, State
import pytest
import respx
f... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/axis/test_hub.py | tests/components/axis/test_hub.py | """Test Axis device."""
from collections.abc import Callable
from ipaddress import ip_address
from types import MappingProxyType
from typing import Any
from unittest import mock
from unittest.mock import ANY, Mock, call, patch
import axis as axislib
import pytest
from syrupy.assertion import SnapshotAssertion
from h... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/axis/__init__.py | tests/components/axis/__init__.py | """Tests for the Axis component."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/axis/test_camera.py | tests/components/axis/test_camera.py | """Axis camera platform tests."""
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components import camera
from homeassistant.components.axis.const import CONF_STREAM_PROFILE
from homeassistant.components.camera import DOMAIN as CAMERA_DOMAIN
from homea... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/axis/test_light.py | tests/components/axis/test_light.py | """Axis light platform tests."""
from typing import Any
from unittest.mock import patch
from axis.models.api import CONTEXT
import pytest
import respx
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.light import ATTR_BRIGHTNESS, DOMAIN as LIGHT_DOMAIN
from homeassistant.const import (
... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.