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/telegram/test_notify.py | tests/components/telegram/test_notify.py | """The tests for the telegram.notify platform."""
from unittest.mock import patch
from homeassistant import config as hass_config
from homeassistant.components import notify
from homeassistant.components.telegram import DOMAIN
from homeassistant.const import SERVICE_RELOAD
from homeassistant.core import 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/telegram/__init__.py | tests/components/telegram/__init__.py | """Tests for telegram 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/climate/test_reproduce_state.py | tests/components/climate/test_reproduce_state.py | """The tests for reproduction of state."""
import pytest
from homeassistant.components.climate import (
ATTR_FAN_MODE,
ATTR_HUMIDITY,
ATTR_PRESET_MODE,
ATTR_SWING_HORIZONTAL_MODE,
ATTR_SWING_MODE,
ATTR_TARGET_TEMP_HIGH,
ATTR_TARGET_TEMP_LOW,
DOMAIN,
SERVICE_SET_FAN_MODE,
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/climate/common.py | tests/components/climate/common.py | """Collection of helper methods.
All containing methods are legacy helpers that should not be used by new
components. Instead call the service directly.
"""
from homeassistant.components.climate import (
_LOGGER,
ATTR_FAN_MODE,
ATTR_HUMIDITY,
ATTR_HVAC_MODE,
ATTR_PRESET_MODE,
ATTR_SWING_HORIZO... | 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/climate/test_device_trigger.py | tests/components/climate/test_device_trigger.py | """The tests for Climate device triggers."""
import pytest
from pytest_unordered import unordered
import voluptuous_serialize
from homeassistant.components import automation
from homeassistant.components.climate import (
DOMAIN,
HVACAction,
HVACMode,
const,
device_trigger,
)
from homeassistant.com... | 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/climate/test_significant_change.py | tests/components/climate/test_significant_change.py | """Test the Climate significant change platform."""
import pytest
from homeassistant.components.climate import (
ATTR_CURRENT_HUMIDITY,
ATTR_CURRENT_TEMPERATURE,
ATTR_FAN_MODE,
ATTR_HUMIDITY,
ATTR_HVAC_ACTION,
ATTR_PRESET_MODE,
ATTR_SWING_HORIZONTAL_MODE,
ATTR_SWING_MODE,
ATTR_TARG... | 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/climate/test_intent.py | tests/components/climate/test_intent.py | """Test climate intents."""
from collections.abc import Generator
from typing import Any
import pytest
from homeassistant.components import conversation
from homeassistant.components.climate import (
ATTR_TEMPERATURE,
DOMAIN,
ClimateEntity,
ClimateEntityFeature,
HVACMode,
intent as climate_in... | 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/climate/test_device_condition.py | tests/components/climate/test_device_condition.py | """The tests for Climate device conditions."""
import pytest
from pytest_unordered import unordered
import voluptuous_serialize
from homeassistant.components import automation
from homeassistant.components.climate import DOMAIN, HVACMode, const, device_condition
from homeassistant.components.device_automation 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/climate/conftest.py | tests/components/climate/conftest.py | """Fixtures for Climate platform tests."""
from collections.abc import Generator
import pytest
from homeassistant.config_entries import ConfigEntry, ConfigFlow
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from tests.common import (
MockConfigEntry,
MockModule,
mo... | 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/climate/__init__.py | tests/components/climate/__init__.py | """The tests for climate 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/climate/test_recorder.py | tests/components/climate/test_recorder.py | """The tests for climate recorder."""
from __future__ import annotations
from datetime import timedelta
from unittest.mock import patch
import pytest
from homeassistant.components import climate
from homeassistant.components.climate import (
ATTR_FAN_MODES,
ATTR_HVAC_MODES,
ATTR_MAX_HUMIDITY,
ATTR_M... | 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/climate/test_device_action.py | tests/components/climate/test_device_action.py | """The tests for Climate device actions."""
import pytest
from pytest_unordered import unordered
import voluptuous_serialize
from homeassistant.components import automation
from homeassistant.components.climate import DOMAIN, HVACMode, const, device_action
from homeassistant.components.device_automation import Device... | 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/climate/test_init.py | tests/components/climate/test_init.py | """The tests for the climate component."""
from __future__ import annotations
from enum import Enum
from typing import Any
from unittest.mock import MagicMock, Mock
import pytest
import voluptuous as vol
from homeassistant.components.climate import (
DOMAIN,
SET_TEMPERATURE_SCHEMA,
ClimateEntity,
HV... | 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/climate/test_trigger.py | tests/components/climate/test_trigger.py | """Test climate trigger."""
from collections.abc import Generator
from contextlib import AbstractContextManager, nullcontext as does_not_raise
from typing import Any
from unittest.mock import patch
import pytest
import voluptuous as vol
from homeassistant.components.climate.const import (
ATTR_CURRENT_HUMIDITY,
... | 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/ecovacs/test_lawn_mower.py | tests/components/ecovacs/test_lawn_mower.py | """Tests for Ecovacs lawn mower entities."""
from dataclasses import dataclass
from deebot_client.command import Command
from deebot_client.commands.json import Charge, CleanV2
from deebot_client.events import StateEvent
from deebot_client.models import CleanAction, State
import pytest
from syrupy.assertion import Sn... | 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/ecovacs/test_button.py | tests/components/ecovacs/test_button.py | """Tests for Ecovacs sensors."""
from deebot_client.command import Command
from deebot_client.commands import StationAction
from deebot_client.commands.json import (
ResetLifeSpan,
SetRelocationState,
station_action,
)
from deebot_client.events import LifeSpan
import pytest
from syrupy.assertion import Sna... | 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/ecovacs/test_diagnostics.py | tests/components/ecovacs/test_diagnostics.py | """Tests for diagnostics data."""
import pytest
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.const import CONF_USERNAME
from homeassistant.core import HomeAssistant
from .const import VALID_ENTRY_DATA_CLOUD, VALID_ENTRY_DATA_SELF_HOSTED
from tests.common 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/ecovacs/test_binary_sensor.py | tests/components/ecovacs/test_binary_sensor.py | """Tests for Ecovacs binary sensors."""
from deebot_client.events.water_info import MopAttachedEvent
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.ecovacs.const import DOMAIN
from homeassistant.components.ecovacs.controller import EcovacsController
from homeassistant.const... | 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/ecovacs/test_sensor.py | tests/components/ecovacs/test_sensor.py | """Tests for Ecovacs sensors."""
from unittest.mock import Mock
from deebot_client.event_bus import EventBus
from deebot_client.events import (
BatteryEvent,
ErrorEvent,
LifeSpan,
LifeSpanEvent,
NetworkInfoEvent,
StatsEvent,
TotalStatsEvent,
station,
)
import pytest
from syrupy.asserti... | 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/ecovacs/test_switch.py | tests/components/ecovacs/test_switch.py | """Tests for Ecovacs select entities."""
from dataclasses import dataclass
from deebot_client.command import Command
from deebot_client.commands.json import (
SetAdvancedMode,
SetBorderSpin,
SetBorderSwitch,
SetCarpetAutoFanBoost,
SetChildLock,
SetContinuousCleaning,
SetCrossMapBorderWarni... | 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/ecovacs/util.py | tests/components/ecovacs/util.py | """Ecovacs test util."""
import asyncio
from deebot_client.event_bus import EventBus
from deebot_client.events import Event
from homeassistant.core import HomeAssistant
async def block_till_done(hass: HomeAssistant, event_bus: EventBus) -> None:
"""Block till done."""
await asyncio.gather(*event_bus._tasks... | 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/ecovacs/test_config_flow.py | tests/components/ecovacs/test_config_flow.py | """Test Ecovacs config flow."""
from collections.abc import Awaitable, Callable
from dataclasses import dataclass, field
import ssl
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
from aiohttp import ClientError
from deebot_client.exceptions import InvalidAuthenticationError, MqttError
from de... | 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/ecovacs/test_services.py | tests/components/ecovacs/test_services.py | """Tests for Ecovacs services."""
from collections.abc import Generator
from typing import Any
from unittest.mock import patch
from deebot_client.device import Device
import pytest
from homeassistant.components.ecovacs.const import DOMAIN
from homeassistant.components.ecovacs.vacuum import SERVICE_RAW_GET_POSITIONS
... | 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/ecovacs/test_select.py | tests/components/ecovacs/test_select.py | """Tests for Ecovacs select entities."""
from deebot_client.command import Command
from deebot_client.commands.json import SetWaterInfo
from deebot_client.commands.json.auto_empty import SetAutoEmpty
from deebot_client.event_bus import EventBus
from deebot_client.events import auto_empty
from deebot_client.events.map ... | 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/ecovacs/const.py | tests/components/ecovacs/const.py | """Test ecovacs constants."""
from homeassistant.components.ecovacs.const import (
CONF_CONTINENT,
CONF_OVERRIDE_MQTT_URL,
CONF_OVERRIDE_REST_URL,
CONF_VERIFY_MQTT_CERTIFICATE,
)
from homeassistant.const import CONF_COUNTRY, CONF_PASSWORD, CONF_USERNAME
VALID_ENTRY_DATA_CLOUD = {
CONF_USERNAME: "u... | 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/ecovacs/conftest.py | tests/components/ecovacs/conftest.py | """Common fixtures for the Ecovacs tests."""
from collections.abc import AsyncGenerator, Generator
import logging
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
from deebot_client import const
from deebot_client.command import DeviceCommandResult
from deebot_client.device import Device
from d... | 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/ecovacs/__init__.py | tests/components/ecovacs/__init__.py | """Tests for the Ecovacs 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/ecovacs/test_event.py | tests/components/ecovacs/test_event.py | """Tests for Ecovacs event entities."""
from datetime import timedelta
from deebot_client.events import CleanJobStatus, ReportStatsEvent
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.ecovacs.const import DOMAIN
from homeassi... | 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/ecovacs/test_number.py | tests/components/ecovacs/test_number.py | """Tests for Ecovacs select entities."""
from dataclasses import dataclass
from deebot_client.command import Command
from deebot_client.commands.json import (
SetCleanCount,
SetCutDirection,
SetVolume,
SetWaterInfo,
)
from deebot_client.events import CleanCountEvent, CutDirectionEvent, Event, VolumeEv... | 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/ecovacs/test_init.py | tests/components/ecovacs/test_init.py | """Test init of ecovacs."""
from unittest.mock import Mock, patch
from deebot_client.exceptions import DeebotError, InvalidAuthenticationError
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.ecovacs.const import DOMAIN
from homeassistant.components.ecovacs.controller 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/homeassistant_alerts/__init__.py | tests/components/homeassistant_alerts/__init__.py | """Tests for the Home Assistant alerts 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/homeassistant_alerts/test_init.py | tests/components/homeassistant_alerts/test_init.py | """Test creating repairs from alerts."""
from __future__ import annotations
from datetime import timedelta
import json
from unittest.mock import ANY, patch
from freezegun.api import FrozenDateTimeFactory
import pytest
from pytest_unordered import unordered
from homeassistant.components.homeassistant_alerts.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/elgato/test_button.py | tests/components/elgato/test_button.py | """Tests for the Elgato Light button platform."""
from unittest.mock import MagicMock
from elgato import ElgatoError
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.const import ATTR_ENTITY_ID
from home... | 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/elgato/test_diagnostics.py | tests/components/elgato/test_diagnostics.py | """Tests for the diagnostics data provided by the Elgato 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 ClientSessio... | 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/elgato/test_sensor.py | tests/components/elgato/test_sensor.py | """Tests for the Elgato sensor platform."""
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.parametrize("device_fixtures", ["key-light-mini"]),
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/elgato/test_switch.py | tests/components/elgato/test_switch.py | """Tests for the Elgato switch platform."""
from unittest.mock import MagicMock
from elgato import ElgatoError
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.switch import (
DOMAIN as SWITCH_DOMAIN,
SERVICE_TURN_OFF,
SERVICE_TURN_ON,
)
from homeassistant.const ... | 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/elgato/test_config_flow.py | tests/components/elgato/test_config_flow.py | """Tests for the Elgato Key Light config flow."""
from ipaddress import ip_address
from unittest.mock import AsyncMock, MagicMock
from elgato import ElgatoConnectionError
import pytest
from homeassistant.components.elgato.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER, SOURCE_ZEROCONF
from ... | 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/elgato/conftest.py | tests/components/elgato/conftest.py | """Fixtures for Elgato integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
from elgato import BatteryInfo, ElgatoNoBatteryError, Info, Settings, State
import pytest
from homeassistant.components.elgato.const import DOMAIN
from homeassistant.const import C... | 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/elgato/__init__.py | tests/components/elgato/__init__.py | """Tests for the Elgato Key Light 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/elgato/test_light.py | tests/components/elgato/test_light.py | """Tests for the Elgato Key Light light platform."""
from unittest.mock import MagicMock
from elgato import ElgatoError
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.elgato.const import DOMAIN, SERVICE_IDENTIFY
from homeassistant.components.light import (
ATTR_BRIGHTN... | 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/elgato/test_init.py | tests/components/elgato/test_init.py | """Tests for the Elgato Key Light integration."""
from unittest.mock import MagicMock
from elgato import ElgatoConnectionError
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
async def test_load_unload_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/bring/test_diagnostics.py | tests/components/bring/test_diagnostics.py | """Test for diagnostics platform of the Bring! integration."""
from unittest.mock import AsyncMock
from bring_api import BringItemsResponse
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.bring.const import DOMAIN
from homeassistant.core import HomeAssistant
from tests.com... | 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/bring/test_sensor.py | tests/components/bring/test_sensor.py | """Test for sensor platform of the Bring! integration."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
from bring_api import BringItemsResponse
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.bring.const import DOMAIN
from homeassistant.c... | 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/bring/test_util.py | tests/components/bring/test_util.py | """Test for utility functions of the Bring! integration."""
from bring_api import BringItemsResponse, BringListResponse, BringUserSettingsResponse
import pytest
from homeassistant.components.bring.const import DOMAIN
from homeassistant.components.bring.coordinator import BringData
from homeassistant.components.bring.... | 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/bring/test_todo.py | tests/components/bring/test_todo.py | """Test for todo platform of the Bring! integration."""
from collections.abc import Generator
import re
from unittest.mock import AsyncMock, patch
from bring_api import BringItemOperation, BringItemsResponse, BringRequestException
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.compon... | 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/bring/test_config_flow.py | tests/components/bring/test_config_flow.py | """Test the Bring! config flow."""
from unittest.mock import AsyncMock
from bring_api import BringAuthException, BringParseException, BringRequestException
import pytest
from homeassistant.components.bring.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import CONF_E... | 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/bring/test_services.py | tests/components/bring/test_services.py | """Test actions of Bring! integration."""
from unittest.mock import AsyncMock
from bring_api import (
ActivityType,
BringActivityResponse,
BringNotificationType,
BringRequestException,
ReactionType,
)
import pytest
from homeassistant.components.bring.const import (
ATTR_REACTION,
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/bring/conftest.py | tests/components/bring/conftest.py | """Common fixtures for the Bring! tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import uuid
from bring_api import (
BringActivityResponse,
BringAuthResponse,
BringItemsResponse,
BringListResponse,
BringUserSettingsResponse,
BringUsersResponse,
)
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/bring/test_notification.py | tests/components/bring/test_notification.py | """Test todo entity notification action of the Bring! integration."""
import re
from unittest.mock import AsyncMock
from bring_api import BringNotificationType, BringRequestException
import pytest
from homeassistant.components.bring.const import (
ATTR_ITEM_NAME,
ATTR_NOTIFICATION_TYPE,
DOMAIN,
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/bring/__init__.py | tests/components/bring/__init__.py | """Tests for the Bring! 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/bring/test_event.py | tests/components/bring/test_event.py | """Test for event platform of the Bring! integration."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.config_entries import ConfigEntryState
from homeassistant.const import Platform
from homeassistant.core 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/bring/test_init.py | tests/components/bring/test_init.py | """Unit tests for the bring integration."""
from datetime import timedelta
from unittest.mock import AsyncMock
from bring_api import (
BringAuthException,
BringListResponse,
BringParseException,
BringRequestException,
)
from freezegun.api import FrozenDateTimeFactory
import pytest
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/glances/test_sensor.py | tests/components/glances/test_sensor.py | """Tests for glances sensors."""
from datetime import timedelta
from unittest.mock import AsyncMock
from freezegun.api import FrozenDateTimeFactory
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.glances.const import DOMAIN
from homeassistant.const import STATE_UNAVAILABLE
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/glances/test_config_flow.py | tests/components/glances/test_config_flow.py | """Tests for Glances config flow."""
from unittest.mock import MagicMock, patch
from glances_api.exceptions import (
GlancesApiAuthorizationError,
GlancesApiConnectionError,
GlancesApiNoDataAvailable,
)
import pytest
from homeassistant import config_entries
from homeassistant.components.glances.const 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/glances/conftest.py | tests/components/glances/conftest.py | """Conftest for speedtestdotnet."""
from unittest.mock import AsyncMock, patch
import pytest
from . import HA_SENSOR_DATA
@pytest.fixture(autouse=True)
def mock_api():
"""Mock glances api."""
with patch("homeassistant.components.glances.Glances") as mock_api:
mock_api.return_value.get_ha_sensor_dat... | 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/glances/__init__.py | tests/components/glances/__init__.py | """Tests for Glances."""
from datetime import datetime
from typing import Any
MOCK_USER_INPUT: dict[str, Any] = {
"host": "0.0.0.0",
"username": "username",
"password": "password",
"port": 61208,
"ssl": False,
"verify_ssl": True,
}
MOCK_REFERENCE_DATE: datetime = datetime.fromisoformat("2024-... | 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/glances/test_init.py | tests/components/glances/test_init.py | """Tests for Glances integration."""
from unittest.mock import MagicMock
from glances_api.exceptions import (
GlancesApiAuthorizationError,
GlancesApiConnectionError,
GlancesApiNoDataAvailable,
)
import pytest
from homeassistant.components.glances.const import DOMAIN
from homeassistant.config_entries 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/simplisafe/test_diagnostics.py | tests/components/simplisafe/test_diagnostics.py | """Test SimpliSafe diagnostics."""
from homeassistant.components.diagnostics import REDACTED
from homeassistant.core import HomeAssistant
from tests.common import ANY
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerator
async def test_entry_diagno... | 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/simplisafe/common.py | tests/components/simplisafe/common.py | """Define common SimpliSafe test constants/etc."""
REFRESH_TOKEN = "token123"
USERNAME = "user@email.com"
USER_ID = "12345"
| 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/simplisafe/test_config_flow.py | tests/components/simplisafe/test_config_flow.py | """Define tests for the SimpliSafe config flow."""
import logging
from unittest.mock import patch
import pytest
from simplipy.errors import InvalidCredentialsError, SimplipyError
from homeassistant.components.simplisafe import DOMAIN
from homeassistant.components.simplisafe.config_flow import CONF_AUTH_CODE
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/simplisafe/conftest.py | tests/components/simplisafe/conftest.py | """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 homeassistant.components.simplisafe.const import DOMAIN
from homeassistant.const import CONF_CODE, CONF_PASSWORD, CONF_TOKE... | 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/simplisafe/__init__.py | tests/components/simplisafe/__init__.py | """Define tests for the SimpliSafe 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/simplisafe/test_init.py | tests/components/simplisafe/test_init.py | """Define tests for SimpliSafe setup."""
from unittest.mock import patch
from homeassistant.components.simplisafe import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr
from homeassistant.setup import async_setup_component
async def test_base_station_migra... | 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/statistics/test_sensor.py | tests/components/statistics/test_sensor.py | """The test for the statistics sensor platform."""
from __future__ import annotations
from asyncio import Event as AsyncioEvent
from collections.abc import Sequence
from datetime import datetime, timedelta
import statistics
from threading import Event as ThreadingEvent
from typing import Any
from unittest.mock import... | 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/statistics/test_config_flow.py | tests/components/statistics/test_config_flow.py | """Test the Scrape config flow."""
from __future__ import annotations
from unittest.mock import AsyncMock
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant import config_entries
from homeassistant.components.recorder import Recorder
from homeassistant.components.statistics import DOMAI... | 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/statistics/conftest.py | tests/components/statistics/conftest.py | """Fixtures for the Statistics integration."""
from __future__ import annotations
from collections.abc import Generator
from typing import Any
from unittest.mock import AsyncMock, patch
import pytest
from homeassistant.components.statistics import DOMAIN
from homeassistant.components.statistics.sensor 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/statistics/__init__.py | tests/components/statistics/__init__.py | """Tests for the statistics 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/statistics/test_init.py | tests/components/statistics/test_init.py | """Test Statistics component setup process."""
from __future__ import annotations
from unittest.mock import patch
import pytest
from homeassistant.components import statistics
from homeassistant.components.statistics import DOMAIN
from homeassistant.components.statistics.config_flow import StatisticsConfigFlowHandl... | 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/thermobeacon/test_sensor.py | tests/components/thermobeacon/test_sensor.py | """Test the ThermoBeacon sensors."""
from homeassistant.components.sensor import ATTR_STATE_CLASS
from homeassistant.components.thermobeacon.const import DOMAIN
from homeassistant.const import ATTR_FRIENDLY_NAME, ATTR_UNIT_OF_MEASUREMENT
from homeassistant.core import HomeAssistant
from . import THERMOBEACON_SERVICE_... | 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/thermobeacon/test_config_flow.py | tests/components/thermobeacon/test_config_flow.py | """Test the ThermoBeacon config flow."""
from unittest.mock import patch
from homeassistant import config_entries
from homeassistant.components.thermobeacon.const import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType
from . import NOT_THERMOBEACON_SERVICE... | 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/thermobeacon/conftest.py | tests/components/thermobeacon/conftest.py | """ThermoBeacon session fixtures."""
import pytest
@pytest.fixture(autouse=True)
def mock_bluetooth(enable_bluetooth: None) -> None:
"""Auto mock bluetooth."""
| 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/thermobeacon/__init__.py | tests/components/thermobeacon/__init__.py | """Tests for the ThermoBeacon integration."""
from uuid import UUID
from bleak.backends.device import BLEDevice
from bluetooth_data_tools import monotonic_time_coarse
from homeassistant.components.bluetooth import BluetoothServiceInfoBleak
def make_bluetooth_service_info(
name: str,
manufacturer_data: dict... | 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/nice_go/test_diagnostics.py | tests/components/nice_go/test_diagnostics.py | """Test diagnostics of Nice G.O.."""
from unittest.mock import AsyncMock
import pytest
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.core import HomeAssistant
from . import setup_integration
from tests.common import MockConfigEntry
from tests.components.diagnost... | 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/nice_go/test_switch.py | tests/components/nice_go/test_switch.py | """Nice G.O. switch tests."""
from unittest.mock import AsyncMock
from aiohttp import ClientError
from nice_go import ApiError, AuthFailedError
import pytest
from homeassistant.components.switch import (
DOMAIN as SWITCH_DOMAIN,
SERVICE_TURN_OFF,
SERVICE_TURN_ON,
)
from homeassistant.const import ATTR_EN... | 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/nice_go/test_config_flow.py | tests/components/nice_go/test_config_flow.py | """Test the Nice G.O. config flow."""
from unittest.mock import AsyncMock
from freezegun.api import FrozenDateTimeFactory
from nice_go import AuthFailedError
import pytest
from homeassistant.components.nice_go.const import (
CONF_REFRESH_TOKEN,
CONF_REFRESH_TOKEN_CREATION_TIME,
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/nice_go/conftest.py | tests/components/nice_go/conftest.py | """Common fixtures for the Nice G.O. tests."""
from collections.abc import Generator
from datetime import datetime
from unittest.mock import AsyncMock, patch
from nice_go import Barrier, BarrierState, ConnectionState
import pytest
from homeassistant.components.nice_go.const import (
CONF_REFRESH_TOKEN,
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/nice_go/__init__.py | tests/components/nice_go/__init__.py | """Tests for the Nice G.O. integration."""
from unittest.mock import patch
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
async def setup_integration(
hass: HomeAssistant, config_entry: MockConfigEntry, platforms: list[Platform]
) ... | 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/nice_go/test_event.py | tests/components/nice_go/test_event.py | """Nice G.O. event tests."""
from unittest.mock import AsyncMock, MagicMock
import pytest
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from . import setup_integration
from tests.common import MockConfigEntry
@pytest.mark.freeze_time("2024-08-19")
async def test_barrier_ob... | 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/nice_go/test_light.py | tests/components/nice_go/test_light.py | """Test Nice G.O. light."""
from unittest.mock import AsyncMock
from aiohttp import ClientError
from nice_go import ApiError, AuthFailedError
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.light import (
DOMAIN as LIGHT_DOMAIN,
SERVICE_TURN_OFF,
SERVICE_TURN_ON... | 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/nice_go/test_init.py | tests/components/nice_go/test_init.py | """Test Nice G.O. init."""
import asyncio
from datetime import timedelta
from unittest.mock import AsyncMock, MagicMock, patch
from freezegun.api import FrozenDateTimeFactory
from nice_go import ApiError, AuthFailedError, Barrier, BarrierState
import pytest
from syrupy.assertion import SnapshotAssertion
from homeass... | 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/nice_go/test_cover.py | tests/components/nice_go/test_cover.py | """Test Nice G.O. cover."""
from unittest.mock import AsyncMock
from aiohttp import ClientError
from freezegun.api import FrozenDateTimeFactory
from nice_go import ApiError, AuthFailedError
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.cover import (
DOMAIN as COVER_D... | 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/simplefin/test_binary_sensor.py | tests/components/simplefin/test_binary_sensor.py | """Test SimpleFin Sensor with Snapshot data."""
from unittest.mock import AsyncMock, 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 setup_integration
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/simplefin/test_sensor.py | tests/components/simplefin/test_sensor.py | """Test SimpleFin Sensor with Snapshot data."""
from datetime import timedelta
from unittest.mock import AsyncMock, patch
from freezegun.api import FrozenDateTimeFactory
import pytest
from simplefin4py.exceptions import SimpleFinAuthError, SimpleFinPaymentRequiredError
from syrupy.assertion import SnapshotAssertion
... | 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/simplefin/test_config_flow.py | tests/components/simplefin/test_config_flow.py | """Test config flow."""
from unittest.mock import AsyncMock
import pytest
from simplefin4py.exceptions import (
SimpleFinAuthError,
SimpleFinClaimError,
SimpleFinInvalidAccountURLError,
SimpleFinInvalidClaimTokenError,
SimpleFinPaymentRequiredError,
)
from homeassistant.components.simplefin impor... | 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/simplefin/conftest.py | tests/components/simplefin/conftest.py | """Test fixtures for SimpleFIN."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from simplefin4py import FinancialData
from simplefin4py.exceptions import SimpleFinInvalidClaimTokenError
from homeassistant.components.simplefin import CONF_ACCESS_URL
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/simplefin/__init__.py | tests/components/simplefin/__init__.py | """Tests for SimpleFin."""
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)
await hass.config_entries.... | 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/faa_delays/test_config_flow.py | tests/components/faa_delays/test_config_flow.py | """Test the FAA Delays config flow."""
from unittest.mock import patch
from aiohttp import ClientConnectionError
import faadelays
from homeassistant import config_entries
from homeassistant.components.faa_delays.const import DOMAIN
from homeassistant.const import CONF_ID
from homeassistant.core import 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/faa_delays/__init__.py | tests/components/faa_delays/__init__.py | """Tests for the FAA Delays 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/smtp/test_notify.py | tests/components/smtp/test_notify.py | """The tests for the notify smtp platform."""
from pathlib import Path
import re
from unittest.mock import patch
import pytest
from homeassistant import config as hass_config
from homeassistant.components import notify
from homeassistant.components.smtp.const import DOMAIN
from homeassistant.components.smtp.notify 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/smtp/__init__.py | tests/components/smtp/__init__.py | """Tests for the smtp 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/tomorrowio/test_sensor.py | tests/components/tomorrowio/test_sensor.py | """Tests for Tomorrow.io sensor entities."""
from __future__ import annotations
from datetime import datetime
from typing import Any
from freezegun import freeze_time
import pytest
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN, async_rounded_state
from homeassistant.components.tomorrowio.confi... | 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/tomorrowio/test_weather.py | tests/components/tomorrowio/test_weather.py | """Tests for Tomorrow.io weather entity."""
from __future__ import annotations
from datetime import datetime, timedelta
from typing import Any
from freezegun import freeze_time
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
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/tomorrowio/test_config_flow.py | tests/components/tomorrowio/test_config_flow.py | """Test the Tomorrow.io config flow."""
from unittest.mock import patch
from pytomorrowio.exceptions import (
CantConnectException,
InvalidAPIKeyException,
RateLimitedException,
UnknownException,
)
from homeassistant.components.tomorrowio.config_flow import (
_get_config_schema,
_get_unique_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/tomorrowio/const.py | tests/components/tomorrowio/const.py | """Constants for tomorrowio tests."""
from homeassistant.const import (
CONF_API_KEY,
CONF_LATITUDE,
CONF_LOCATION,
CONF_LONGITUDE,
)
API_KEY = "aa"
MIN_CONFIG = {
CONF_API_KEY: API_KEY,
}
API_V4_ENTRY_DATA = {
CONF_API_KEY: API_KEY,
CONF_LOCATION: {
CONF_LATITUDE: 80.0,
... | 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/tomorrowio/conftest.py | tests/components/tomorrowio/conftest.py | """Configure py.test."""
import json
from unittest.mock import PropertyMock, patch
import pytest
from tests.common import load_fixture
@pytest.fixture(name="tomorrowio_config_flow_connect", autouse=True)
def tomorrowio_config_flow_connect():
"""Mock valid tomorrowio config flow setup."""
with patch(
... | 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/tomorrowio/__init__.py | tests/components/tomorrowio/__init__.py | """Tests for the Tomorrow.io Weather API 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/tomorrowio/test_init.py | tests/components/tomorrowio/test_init.py | """Tests for Tomorrow.io init."""
from datetime import timedelta
from freezegun.api import FrozenDateTimeFactory
from homeassistant.components.tomorrowio.config_flow import (
_get_config_schema,
_get_unique_id,
)
from homeassistant.components.tomorrowio.const import CONF_TIMESTEP, DOMAIN
from homeassistant.c... | 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/cloudflare/test_config_flow.py | tests/components/cloudflare/test_config_flow.py | """Test the Cloudflare config flow."""
from unittest.mock import MagicMock
import pycfdns
from homeassistant.components.cloudflare.const import CONF_RECORDS, DOMAIN
from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import CONF_API_TOKEN, CONF_SOURCE, CONF_ZONE
from homeassistant.core 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/cloudflare/conftest.py | tests/components/cloudflare/conftest.py | """Define fixtures available for all tests."""
from collections.abc import Generator
from unittest.mock import MagicMock, patch
import pytest
from . import get_mock_client
@pytest.fixture
def cfupdate() -> Generator[MagicMock]:
"""Mock the CloudflareUpdater for easier testing."""
mock_cfupdate = get_mock_c... | 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/cloudflare/__init__.py | tests/components/cloudflare/__init__.py | """Tests for the Cloudflare integration."""
from __future__ import annotations
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
import pycfdns
from homeassistant.components.cloudflare.const import CONF_RECORDS, DOMAIN
from homeassistant.const import CONF_API_TOKEN, CONF_ZONE
from homeassistan... | 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.