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/kostal_plenticore/test_select.py | tests/components/kostal_plenticore/test_select.py | """Test the Kostal Plenticore Solar Inverter select platform."""
from pykoplenti import SettingsData
import pytest
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from tests.common import MockConfigEntry
pytestmark = [
pytest.mark.usefixtures("mock_plenticore... | 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/kostal_plenticore/conftest.py | tests/components/kostal_plenticore/conftest.py | """Fixtures for Kostal Plenticore tests."""
from __future__ import annotations
from collections.abc import Generator, Iterable
import copy
from unittest.mock import patch
from pykoplenti import ExtendedApiClient, MeData, SettingsData, VersionData
import pytest
from homeassistant.core import HomeAssistant
from test... | 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/kostal_plenticore/__init__.py | tests/components/kostal_plenticore/__init__.py | """Tests for the Kostal Plenticore Solar Inverter 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/kostal_plenticore/test_number.py | tests/components/kostal_plenticore/test_number.py | """Test Kostal Plenticore number."""
from datetime import timedelta
from pykoplenti import ApiClient, SettingsData
import pytest
from homeassistant.components.number import (
ATTR_MAX,
ATTR_MIN,
ATTR_VALUE,
DOMAIN as NUMBER_DOMAIN,
SERVICE_SET_VALUE,
)
from homeassistant.const import ATTR_ENTITY_... | 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/kostal_plenticore/test_helper.py | tests/components/kostal_plenticore/test_helper.py | """Test Kostal Plenticore helper."""
from collections.abc import Generator
from unittest.mock import AsyncMock, MagicMock, patch
from pykoplenti import ApiClient, ExtendedApiClient, SettingsData
import pytest
from homeassistant.components.kostal_plenticore.const import DOMAIN
from homeassistant.core import 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/wake_word/common.py | tests/components/wake_word/common.py | """Provide common test tools for wake-word-detection."""
from __future__ import annotations
from collections.abc import Callable, Coroutine
from pathlib import Path
from typing import Any
from homeassistant.components import wake_word
from homeassistant.config_entries import ConfigEntry
from homeassistant.core 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/wake_word/__init__.py | tests/components/wake_word/__init__.py | """Wake-word-detection tests."""
| 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/wake_word/test_init.py | tests/components/wake_word/test_init.py | """Test wake_word component setup."""
import asyncio
from collections.abc import AsyncIterable, Generator
from functools import partial
from pathlib import Path
from unittest.mock import patch
import pytest
from homeassistant.components import wake_word
from homeassistant.config_entries import ConfigEntry, ConfigEnt... | 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/zodiac/test_sensor.py | tests/components/zodiac/test_sensor.py | """The test for the zodiac sensor platform."""
from datetime import datetime
from unittest.mock import patch
import pytest
from homeassistant.components.sensor import ATTR_OPTIONS, SensorDeviceClass
from homeassistant.components.zodiac.const import (
ATTR_ELEMENT,
ATTR_MODALITY,
DOMAIN,
ELEMENT_EARTH... | 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/zodiac/test_config_flow.py | tests/components/zodiac/test_config_flow.py | """Tests for the Zodiac config flow."""
from unittest.mock import patch
import pytest
from homeassistant.components.zodiac.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType
from tests.common ... | 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/zodiac/__init__.py | tests/components/zodiac/__init__.py | """Tests for the zodiac 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/repairs/__init__.py | tests/components/repairs/__init__.py | """Tests for the repairs integration."""
from http import HTTPStatus
from typing import Any
from aiohttp.test_utils import TestClient
from homeassistant.components.repairs.issue_handler import ( # noqa: F401
async_process_repairs_platforms,
)
from homeassistant.components.repairs.websocket_api import (
Repa... | 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/repairs/test_websocket_api.py | tests/components/repairs/test_websocket_api.py | """Test the repairs websocket API."""
from __future__ import annotations
from http import HTTPStatus
from typing import Any
from unittest.mock import ANY, AsyncMock, Mock
import pytest
import voluptuous as vol
from homeassistant import data_entry_flow
from homeassistant.components.repairs import RepairsFlow
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/repairs/test_init.py | tests/components/repairs/test_init.py | """Test the repairs websocket API."""
from unittest.mock import AsyncMock, Mock
from awesomeversion.exceptions import AwesomeVersionStrategyException
from freezegun.api import FrozenDateTimeFactory
import pytest
from homeassistant.components.repairs import repairs_flow_manager
from homeassistant.components.repairs.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/oncue/__init__.py | tests/components/oncue/__init__.py | """Tests for the Oncue 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/oncue/test_init.py | tests/components/oncue/test_init.py | """Tests for the Oncue integration."""
from homeassistant.components.oncue import DOMAIN
from homeassistant.config_entries import (
SOURCE_IGNORE,
ConfigEntryDisabler,
ConfigEntryState,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers import issue_registry as ir
from tests.common ... | 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/application_credentials/__init__.py | tests/components/application_credentials/__init__.py | """Tests for the Application Credentials 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/application_credentials/test_init.py | tests/components/application_credentials/test_init.py | """Test the Developer Credentials integration."""
from __future__ import annotations
from collections.abc import Callable, Generator
import logging
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
import pytest
from homeassistant import config_entries, data_entry_flow
from homeassistant.compo... | 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/jewish_calendar/test_diagnostics.py | tests/components/jewish_calendar/test_diagnostics.py | """Tests for the diagnostics data provided by the Jewish Calendar integration."""
import datetime as dt
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
from tests.components.diagnostics import get_diagnostics_for_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/jewish_calendar/test_binary_sensor.py | tests/components/jewish_calendar/test_binary_sensor.py | """The tests for the Jewish calendar binary sensors."""
from collections.abc import AsyncGenerator
from datetime import datetime as dt
from typing import Any
import pytest
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.core import HomeAssistant
from . import TimeValue, TimeValueSequence
# T... | 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/jewish_calendar/test_sensor.py | tests/components/jewish_calendar/test_sensor.py | """The tests for the Jewish calendar sensors."""
from collections.abc import AsyncGenerator
from datetime import datetime as dt
from typing import Any
from hdate.holidays import HolidayDatabase
from hdate.parasha import Parasha
import pytest
from homeassistant.core import HomeAssistant
from homeassistant.util 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/jewish_calendar/test_config_flow.py | tests/components/jewish_calendar/test_config_flow.py | """Test the Jewish calendar config flow."""
from unittest.mock import AsyncMock
from homeassistant import config_entries
from homeassistant.components.jewish_calendar.const import (
CONF_CANDLE_LIGHT_MINUTES,
CONF_DIASPORA,
CONF_HAVDALAH_OFFSET_MINUTES,
DEFAULT_CANDLE_LIGHT,
DEFAULT_DIASPORA,
... | 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/jewish_calendar/test_services.py | tests/components/jewish_calendar/test_services.py | """Test jewish calendar service."""
import datetime as dt
import pytest
from homeassistant.components.jewish_calendar.const import (
ATTR_AFTER_SUNSET,
ATTR_DATE,
ATTR_NUSACH,
DOMAIN,
)
from homeassistant.const import CONF_LANGUAGE
from homeassistant.core import HomeAssistant
@pytest.mark.parametri... | 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/jewish_calendar/conftest.py | tests/components/jewish_calendar/conftest.py | """Common fixtures for the jewish_calendar tests."""
from __future__ import annotations
from collections.abc import AsyncGenerator, Generator, Iterable
import datetime as dt
from typing import Any, NamedTuple
from unittest.mock import AsyncMock, patch
from freezegun import freeze_time
from freezegun.api import Froze... | 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/jewish_calendar/__init__.py | tests/components/jewish_calendar/__init__.py | """Tests for the jewish_calendar component."""
from dataclasses import dataclass
import datetime as dt
@dataclass(frozen=True)
class TimeValue:
"""Single test case."""
time: dt.datetime
expected: str | int | bool | list | dict | None
@dataclass(frozen=True)
class TimeValueSequence:
"""Sequence of ... | 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/jewish_calendar/test_init.py | tests/components/jewish_calendar/test_init.py | """Tests for the Jewish Calendar component's init."""
import pytest
from homeassistant.components.jewish_calendar.const import DOMAIN
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
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/shelly/test_button.py | tests/components/shelly/test_button.py | """Tests for Shelly button platform."""
from copy import deepcopy
from unittest.mock import Mock
from aioshelly.const import MODEL_BLU_GATEWAY_G3, MODEL_PLUS_SMOKE, MODEL_WALL_DISPLAY
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError, RpcCallError
import pytest
from syrupy.assertion import Snap... | 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/shelly/test_valve.py | tests/components/shelly/test_valve.py | """Tests for Shelly valve platform."""
from copy import deepcopy
from unittest.mock import Mock
from aioshelly.const import MODEL_GAS
import pytest
from homeassistant.components.shelly.const import (
MODEL_FRANKEVER_WATER_VALVE,
MODEL_NEO_WATER_VALVE,
)
from homeassistant.components.valve import (
ATTR_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/shelly/test_diagnostics.py | tests/components/shelly/test_diagnostics.py | """Tests for Shelly diagnostics platform."""
from copy import deepcopy
from unittest.mock import ANY, Mock, PropertyMock
from aioshelly.ble.const import BLE_SCAN_RESULT_EVENT
from aioshelly.const import MODEL_25
from aioshelly.exceptions import DeviceConnectionError
import pytest
from homeassistant.components.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/shelly/test_binary_sensor.py | tests/components/shelly/test_binary_sensor.py | """Tests for Shelly binary sensor platform."""
from copy import deepcopy
from unittest.mock import Mock
from aioshelly.const import MODEL_BLU_GATEWAY_G3, MODEL_MOTION, MODEL_PLUS_SMOKE
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.comp... | 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/shelly/test_sensor.py | tests/components/shelly/test_sensor.py | """Tests for Shelly sensor platform."""
from copy import deepcopy
from unittest.mock import Mock, PropertyMock
from aioshelly.const import MODEL_BLU_GATEWAY_G3, MODEL_EM3
from aioshelly.exceptions import NotInitialized
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import Snapshot... | 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/shelly/test_switch.py | tests/components/shelly/test_switch.py | """Tests for Shelly switch platform."""
from copy import deepcopy
from datetime import timedelta
from unittest.mock import AsyncMock, Mock
from aioshelly.const import MODEL_1PM, MODEL_MOTION
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError, RpcCallError
from freezegun.api import FrozenDateTime... | 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/shelly/test_utils.py | tests/components/shelly/test_utils.py | """Tests for Shelly utils."""
from typing import Any
from unittest.mock import AsyncMock, Mock
from aiohttp.web import Request
from aioshelly.const import (
MODEL_1,
MODEL_1L,
MODEL_BUTTON1,
MODEL_BUTTON1_V2,
MODEL_DIMMER_2,
MODEL_I3,
MODEL_MOTION,
MODEL_PLUS_2PM_V2,
MODEL_WALL_DIS... | 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/shelly/test_device_trigger.py | tests/components/shelly/test_device_trigger.py | """The tests for Shelly device triggers."""
from unittest.mock import Mock
from aioshelly.const import MODEL_BUTTON1
import pytest
from pytest_unordered import unordered
from homeassistant.components import automation
from homeassistant.components.device_automation import (
DeviceAutomationType,
InvalidDevic... | 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/shelly/test_climate.py | tests/components/shelly/test_climate.py | """Tests for Shelly climate platform."""
from copy import deepcopy
from unittest.mock import AsyncMock, Mock, PropertyMock
from aioshelly.const import (
BLU_TRV_IDENTIFIER,
MODEL_BLU_GATEWAY_G3,
MODEL_VALVE,
MODEL_WALL_DISPLAY,
)
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError... | 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/shelly/test_config_flow.py | tests/components/shelly/test_config_flow.py | """Test the Shelly config flow."""
from collections.abc import Generator
from dataclasses import replace
from datetime import timedelta
from ipaddress import ip_address
from typing import Any
from unittest.mock import AsyncMock, MagicMock, Mock, call, patch
from aioshelly.const import DEFAULT_HTTP_PORT, MODEL_1, MODE... | 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/shelly/test_services.py | tests/components/shelly/test_services.py | """Tests for Shelly services."""
from unittest.mock import Mock
from aioshelly.exceptions import DeviceConnectionError, RpcCallError
import pytest
from homeassistant.components.shelly.const import ATTR_KEY, ATTR_VALUE, DOMAIN
from homeassistant.components.shelly.services import (
SERVICE_GET_KVS_VALUE,
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/shelly/test_select.py | tests/components/shelly/test_select.py | """Tests for Shelly select platform."""
from copy import deepcopy
from unittest.mock import Mock
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError, RpcCallError
import pytest
from homeassistant.components.select import (
ATTR_OPTION,
ATTR_OPTIONS,
DOMAIN as SELECT_PLATFORM,
SER... | 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/shelly/conftest.py | tests/components/shelly/conftest.py | """Test configuration for Shelly."""
from collections.abc import Generator
from copy import deepcopy
from unittest.mock import AsyncMock, Mock, PropertyMock, patch
from aioshelly.ble.const import (
BLE_CODE,
BLE_SCAN_RESULT_EVENT,
BLE_SCAN_RESULT_VERSION,
BLE_SCRIPT_NAME,
VAR_ACTIVE,
VAR_EVENT... | 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/shelly/test_devices.py | tests/components/shelly/test_devices.py | """Test real devices."""
from unittest.mock import Mock
from aioshelly.const import MODEL_2PM_G3, MODEL_BLU_GATEWAY_G3, MODEL_PRO_EM3
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.shelly.const import (
DOMAIN,
MODEL_... | 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/shelly/test_text.py | tests/components/shelly/test_text.py | """Tests for Shelly text platform."""
from copy import deepcopy
from unittest.mock import Mock
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError, RpcCallError
import pytest
from homeassistant.components.shelly.const import DOMAIN
from homeassistant.components.text import (
ATTR_VALUE,
... | 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/shelly/test_logbook.py | tests/components/shelly/test_logbook.py | """The tests for Shelly logbook."""
from unittest.mock import Mock
from homeassistant.components.shelly.const import (
ATTR_CHANNEL,
ATTR_CLICK_TYPE,
ATTR_DEVICE,
DOMAIN,
EVENT_SHELLY_CLICK,
)
from homeassistant.const import ATTR_DEVICE_ID
from homeassistant.core import HomeAssistant
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/shelly/__init__.py | tests/components/shelly/__init__.py | """Tests for the Shelly integration."""
from collections.abc import Mapping, Sequence
from contextlib import contextmanager
from copy import deepcopy
from datetime import timedelta
from typing import Any
from unittest.mock import Mock, patch
from aioshelly.const import MODEL_25
from freezegun.api import FrozenDateTim... | 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/shelly/test_coordinator.py | tests/components/shelly/test_coordinator.py | """Tests for Shelly coordinator."""
from datetime import timedelta
from unittest.mock import AsyncMock, Mock, call, patch
from aioshelly.const import MODEL_2PM_G3, MODEL_BULB, MODEL_BUTTON1
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError
from freezegun.api import FrozenDateTimeFactory
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/shelly/test_event.py | tests/components/shelly/test_event.py | """Tests for Shelly button platform."""
from copy import deepcopy
from unittest.mock import Mock
from aioshelly.ble.const import BLE_SCRIPT_NAME
from aioshelly.const import MODEL_I3
import pytest
from pytest_unordered import unordered
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.event... | 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/shelly/test_repairs.py | tests/components/shelly/test_repairs.py | """Test repairs handling for Shelly."""
from unittest.mock import Mock, patch
from aioshelly.const import MODEL_WALL_DISPLAY
from aioshelly.exceptions import DeviceConnectionError, RpcCallError
import pytest
from homeassistant.components.shelly.const import (
BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID,
CONF_B... | 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/shelly/test_update.py | tests/components/shelly/test_update.py | """Tests for Shelly update platform."""
from unittest.mock import AsyncMock, Mock
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError, RpcCallError
from freezegun.api import FrozenDateTimeFactory
import pytest
from homeassistant.components.shelly.const import (
DOMAIN,
GEN1_RELEASE_URL,
... | 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/shelly/test_number.py | tests/components/shelly/test_number.py | """Tests for Shelly number platform."""
from copy import deepcopy
from unittest.mock import AsyncMock, Mock
from aioshelly.const import MODEL_BLU_GATEWAY_G3
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError, RpcCallError
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/shelly/test_light.py | tests/components/shelly/test_light.py | """Tests for Shelly light platform."""
from copy import deepcopy
from unittest.mock import AsyncMock, Mock
from aioshelly.const import (
MODEL_BULB,
MODEL_BULB_RGBW,
MODEL_DIMMER,
MODEL_DIMMER_2,
MODEL_DUO,
MODEL_MULTICOLOR_BULB_G3,
MODEL_RGBW2,
MODEL_VINTAGE_V2,
)
import pytest
from ... | 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/shelly/test_init.py | tests/components/shelly/test_init.py | """Test cases for the Shelly component."""
from ipaddress import IPv4Address
from unittest.mock import AsyncMock, Mock, call, patch
from aioshelly.block_device import COAP
from aioshelly.common import ConnectionOptions
from aioshelly.const import MODEL_BLU_GATEWAY_G3, MODEL_PLUS_2PM
from aioshelly.exceptions 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/shelly/test_cover.py | tests/components/shelly/test_cover.py | """Tests for Shelly cover platform."""
from copy import deepcopy
from unittest.mock import Mock
from freezegun.api import FrozenDateTimeFactory
import pytest
from homeassistant.components.cover import (
ATTR_CURRENT_POSITION,
ATTR_CURRENT_TILT_POSITION,
ATTR_POSITION,
ATTR_TILT_POSITION,
DOMAIN 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/shelly/bluetooth/test_scanner.py | tests/components/shelly/bluetooth/test_scanner.py | """Test the shelly bluetooth scanner."""
from __future__ import annotations
from aioshelly.ble.const import BLE_SCAN_RESULT_EVENT
import pytest
from homeassistant.components import bluetooth
from homeassistant.components.shelly.const import CONF_BLE_SCANNER_MODE, BLEScannerMode
from homeassistant.core import 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/shelly/bluetooth/__init__.py | tests/components/shelly/bluetooth/__init__.py | """Bluetooth tests for Shelly integration."""
from __future__ import annotations
| 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/inels/common.py | tests/components/inels/common.py | """Common methods used across tests."""
from homeassistant.components import inels
from homeassistant.components.inels.const import DOMAIN
from homeassistant.core import HomeAssistant, State
from homeassistant.helpers import device_registry as dr, entity_registry as er
from tests.common import MockConfigEntry
__all_... | 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/inels/test_switch.py | tests/components/inels/test_switch.py | """iNELS switch platform testing."""
from unittest.mock import patch
import pytest
from homeassistant.components.switch import (
DOMAIN as SWITCH_DOMAIN,
SERVICE_TURN_OFF,
SERVICE_TURN_ON,
)
from homeassistant.const import ATTR_ENTITY_ID, STATE_OFF, STATE_ON, STATE_UNAVAILABLE
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/inels/test_config_flow.py | tests/components/inels/test_config_flow.py | """Test the iNELS config flow."""
from unittest.mock import patch
from homeassistant.components.inels.const import DOMAIN, TITLE
from homeassistant.components.mqtt import MQTT_CONNECTION_STATE
from homeassistant.config_entries import SOURCE_MQTT, SOURCE_USER
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/inels/conftest.py | tests/components/inels/conftest.py | """Test fixtures."""
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
import pytest
from homeassistant.core import HomeAssistant
from . import HA_INELS_PATH
from .common import DOMAIN, MockConfigEntry, get_entity_state, set_mock_mqtt
@pytest.fixture(name="mock_mqtt")
def mock_inelsmqtt_fixt... | 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/inels/__init__.py | tests/components/inels/__init__.py | """Tests for the iNELS integration."""
HA_INELS_PATH = "homeassistant.components.inels"
| 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/inels/test_init.py | tests/components/inels/test_init.py | """Tests for iNELS integration."""
from unittest.mock import ANY, AsyncMock, patch
import pytest
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from . import HA_INELS_PATH
from .common import DOMAIN, inels
from tests.common import MockConfigEntry
from tests.ty... | 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/webdav/test_backup.py | tests/components/webdav/test_backup.py | """Test the backups for WebDAV."""
from __future__ import annotations
from collections.abc import AsyncGenerator
from io import StringIO
from unittest.mock import Mock, patch
from aiowebdav2.exceptions import UnauthorizedError, WebDavError
import pytest
from homeassistant.components.backup import DOMAIN as BACKUP_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/webdav/test_config_flow.py | tests/components/webdav/test_config_flow.py | """Test the WebDAV config flow."""
from unittest.mock import AsyncMock
from aiowebdav2.exceptions import (
AccessDeniedError,
MethodNotSupportedError,
UnauthorizedError,
)
import pytest
from homeassistant import config_entries
from homeassistant.components.webdav.const import CONF_BACKUP_PATH, DOMAIN
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/webdav/const.py | tests/components/webdav/const.py | """Constants for WebDAV tests."""
BACKUP_METADATA = {
"addons": [],
"backup_id": "23e64aec",
"date": "2025-02-10T17:47:22.727189+01:00",
"database_included": True,
"extra_metadata": {},
"folders": [],
"homeassistant_included": True,
"homeassistant_version": "2025.2.1",
"name": "Auto... | 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/webdav/conftest.py | tests/components/webdav/conftest.py | """Common fixtures for the WebDAV tests."""
from collections.abc import AsyncIterator, Generator
from json import dumps
from unittest.mock import AsyncMock, patch
import pytest
from homeassistant.components.webdav.const import DOMAIN
from homeassistant.const import CONF_PASSWORD, CONF_URL, CONF_USERNAME
from .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/webdav/__init__.py | tests/components/webdav/__init__.py | """Tests for the WebDAV integration."""
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
async def setup_integration(
hass: HomeAssistant, mock_config_entry: MockConfigEntry
) -> None:
"""Set up the WebDAV integration for testing."""
mock_config_entry.add_to_hass(has... | 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/webdav/test_init.py | tests/components/webdav/test_init.py | """Test WebDAV component setup."""
from unittest.mock import AsyncMock
from aiowebdav2.exceptions import AccessDeniedError, UnauthorizedError
import pytest
from homeassistant.components.webdav.const import CONF_BACKUP_PATH, DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.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/analytics_insights/test_sensor.py | tests/components/analytics_insights/test_sensor.py | """Test the Home Assistant analytics sensor module."""
from datetime import timedelta
from unittest.mock import AsyncMock, patch
from freezegun.api import FrozenDateTimeFactory
import pytest
from python_homeassistant_analytics import (
HomeassistantAnalyticsConnectionError,
HomeassistantAnalyticsNotModifiedEr... | 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/analytics_insights/test_config_flow.py | tests/components/analytics_insights/test_config_flow.py | """Test the Homeassistant Analytics config flow."""
from typing import Any
from unittest.mock import AsyncMock
import pytest
from python_homeassistant_analytics import HomeassistantAnalyticsConnectionError
from homeassistant.components.analytics_insights.const import (
CONF_TRACKED_ADDONS,
CONF_TRACKED_CUSTO... | 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/analytics_insights/conftest.py | tests/components/analytics_insights/conftest.py | """Common fixtures for the Homeassistant Analytics tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from python_homeassistant_analytics import CurrentAnalytics
from python_homeassistant_analytics.models import Addon, CustomIntegration, Integration
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/analytics_insights/__init__.py | tests/components/analytics_insights/__init__.py | """Tests for the Homeassistant Analytics 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 component."""
config_entry.add_to_hass(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/analytics_insights/test_init.py | tests/components/analytics_insights/test_init.py | """Test the Home Assistant analytics init module."""
from __future__ import annotations
from unittest.mock import AsyncMock
from homeassistant.components.analytics_insights.const import DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
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/telegram_bot/test_notify.py | tests/components/telegram_bot/test_notify.py | """Test the telegram bot notify platform."""
from datetime import datetime
from unittest.mock import AsyncMock, patch
import pytest
from telegram import Chat, Message
from telegram.constants import ChatType, ParseMode
from homeassistant.components.notify import (
ATTR_MESSAGE,
ATTR_TITLE,
DOMAIN as NOTIF... | 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_bot/test_diagnostics.py | tests/components/telegram_bot/test_diagnostics.py | """Tests for Telegram bot diagnostics."""
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.telegram_bot.const import DOMAIN
from homeassistant.core import HomeAssistant
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerato... | 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_bot/test_config_flow.py | tests/components/telegram_bot/test_config_flow.py | """Config flow tests for the Telegram Bot integration."""
from unittest.mock import AsyncMock, patch
from telegram import AcceptedGiftTypes, ChatFullInfo, User
from telegram.constants import AccentColor
from telegram.error import BadRequest, InvalidToken, NetworkError
from homeassistant.components.telegram_bot.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/telegram_bot/test_webhooks.py | tests/components/telegram_bot/test_webhooks.py | """Tests for webhooks."""
from ipaddress import IPv4Network
from unittest.mock import patch
from telegram.error import TimedOut
from homeassistant.components.telegram_bot.const import DOMAIN
from homeassistant.components.telegram_bot.webhooks import TELEGRAM_WEBHOOK_URL
from homeassistant.config_entries import 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/telegram_bot/conftest.py | tests/components/telegram_bot/conftest.py | """Tests for the telegram_bot integration."""
from collections.abc import AsyncGenerator, Generator
from datetime import datetime
from typing import Any
from unittest.mock import AsyncMock, patch
import pytest
from telegram import (
AcceptedGiftTypes,
Bot,
Chat,
ChatFullInfo,
Message,
User,
... | 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_bot/test_broadcast.py | tests/components/telegram_bot/test_broadcast.py | """Test Telegram broadcast."""
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
async def test_setup(
hass: HomeAssistant, mock_broadcast_config_entry: MockConfigEntry
) -> None:
"""Test setting up Telegram broadcast."""
mock_broadcast_config_entry.add_to_hass(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/telegram_bot/test_telegram_bot.py | tests/components/telegram_bot/test_telegram_bot.py | """Tests for the telegram_bot component."""
import base64
from datetime import datetime
from http import HTTPStatus
import io
import os
from pathlib import Path
from typing import Any
from unittest.mock import AsyncMock, MagicMock, mock_open, patch
import pytest
from telegram import (
Chat,
File,
InlineKe... | 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/telegram_bot/__init__.py | tests/components/telegram_bot/__init__.py | """Tests for telegram_bot 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/telegram_bot/test_event.py | tests/components/telegram_bot/test_event.py | """Test the telegram bot event platform."""
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.components.telegram_bot.const import (
ATTR_MESSAGE,
ATTR_TARGET,
DOMAIN,
SERVICE_SEND_MESSAGE,
)
from homeassistant.core import HomeAssistant
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/aws_s3/test_backup.py | tests/components/aws_s3/test_backup.py | """Test the AWS S3 backup platform."""
from collections.abc import AsyncGenerator
from io import StringIO
import json
from time import time
from unittest.mock import AsyncMock, Mock, patch
from botocore.exceptions import ConnectTimeoutError
import pytest
from homeassistant.components.aws_s3.backup import (
MULTI... | 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/aws_s3/test_config_flow.py | tests/components/aws_s3/test_config_flow.py | """Test the AWS S3 config flow."""
from unittest.mock import AsyncMock, patch
from botocore.exceptions import (
ClientError,
EndpointConnectionError,
ParamValidationError,
)
import pytest
from homeassistant import config_entries
from homeassistant.components.aws_s3.const import CONF_BUCKET, CONF_ENDPOINT... | 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/aws_s3/const.py | tests/components/aws_s3/const.py | """Consts for AWS S3 tests."""
from homeassistant.components.aws_s3.const import (
CONF_ACCESS_KEY_ID,
CONF_BUCKET,
CONF_ENDPOINT_URL,
CONF_SECRET_ACCESS_KEY,
)
USER_INPUT = {
CONF_ACCESS_KEY_ID: "TestTestTestTestTest",
CONF_SECRET_ACCESS_KEY: "TestTestTestTestTestTestTestTestTestTest",
CO... | 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/aws_s3/conftest.py | tests/components/aws_s3/conftest.py | """Common fixtures for the AWS S3 tests."""
from collections.abc import AsyncIterator, Generator
import json
from unittest.mock import AsyncMock, patch
import pytest
from homeassistant.components.aws_s3.backup import (
MULTIPART_MIN_PART_SIZE_BYTES,
suggested_filenames,
)
from homeassistant.components.aws_s3... | 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/aws_s3/__init__.py | tests/components/aws_s3/__init__.py | """Tests for the AWS S3 integration."""
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
async def setup_integration(
hass: HomeAssistant, mock_config_entry: MockConfigEntry
) -> None:
"""Set up the S3 integration for testing."""
mock_config_entry.add_to_hass(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/aws_s3/test_init.py | tests/components/aws_s3/test_init.py | """Test the AWS S3 storage integration."""
from unittest.mock import AsyncMock, patch
from botocore.exceptions import (
ClientError,
EndpointConnectionError,
ParamValidationError,
)
import pytest
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
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/airvisual_pro/test_diagnostics.py | tests/components/airvisual_pro/test_diagnostics.py | """Test AirVisual Pro diagnostics."""
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.core import HomeAssistant
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerator
async def test_entry_diagnosti... | 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/airvisual_pro/test_config_flow.py | tests/components/airvisual_pro/test_config_flow.py | """Test the AirVisual Pro config flow."""
from unittest.mock import AsyncMock, patch
from pyairvisual.node import (
InvalidAuthenticationError,
NodeConnectionError,
NodeProError,
)
import pytest
from homeassistant.components.airvisual_pro.const import DOMAIN
from homeassistant.config_entries import SOURC... | 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/airvisual_pro/conftest.py | tests/components/airvisual_pro/conftest.py | """Define test fixtures for AirVisual Pro."""
from collections.abc import AsyncGenerator, Generator
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
import pytest
from homeassistant.components.airvisual_pro.const import DOMAIN
from homeassistant.const import CONF_IP_ADDRESS, CONF_PASSWORD
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/airvisual_pro/__init__.py | tests/components/airvisual_pro/__init__.py | """Tests for the AirVisual Pro 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/airvisual_pro/fixtures/__init__.py | tests/components/airvisual_pro/fixtures/__init__.py | """Define data fixtures for AirVisual Pro."""
| 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/songpal/test_media_player.py | tests/components/songpal/test_media_player.py | """Test songpal media_player."""
from datetime import timedelta
import logging
from typing import Any
from unittest.mock import AsyncMock, MagicMock, call, patch
import pytest
from songpal import (
ConnectChange,
ContentChange,
PowerChange,
SongpalException,
VolumeChange,
)
from songpal.notificati... | 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/songpal/test_config_flow.py | tests/components/songpal/test_config_flow.py | """Test the songpal config flow."""
import copy
import dataclasses
from unittest.mock import patch
from homeassistant.components.songpal.const import CONF_ENDPOINT, DOMAIN
from homeassistant.config_entries import (
SOURCE_IMPORT,
SOURCE_SSDP,
SOURCE_USER,
ConfigFlowResult,
)
from homeassistant.const 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/songpal/__init__.py | tests/components/songpal/__init__.py | """Test the songpal integration."""
from unittest.mock import AsyncMock, MagicMock, patch
from songpal import SongpalException
from songpal.containers import Sysinfo
from homeassistant.components.songpal.const import CONF_ENDPOINT
from homeassistant.const import CONF_NAME
FRIENDLY_NAME = "name"
ENTITY_ID = f"media_... | 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/songpal/test_init.py | tests/components/songpal/test_init.py | """Tests songpal setup."""
from unittest.mock import patch
from homeassistant.components import songpal
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
from . import (
CONF_DATA,
_create_mocked_device,
_patch_config_flow_device,
_patch_media_player_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/version/test_diagnostics.py | tests/components/version/test_diagnostics.py | """Test version diagnostics."""
from homeassistant.core import HomeAssistant
from .common import MOCK_VERSION, setup_version_integration
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerator
async def test_diagnostics(
hass: 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/version/test_binary_sensor.py | tests/components/version/test_binary_sensor.py | """The test for the version binary sensor platform."""
from __future__ import annotations
from homeassistant.components.version.const import DEFAULT_CONFIGURATION
from homeassistant.core import HomeAssistant
from .common import setup_version_integration
async def test_version_binary_sensor_local_source(hass: 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/version/common.py | tests/components/version/common.py | """Fixtures for version integration."""
from __future__ import annotations
from typing import Any, Final
from unittest.mock import patch
from freezegun.api import FrozenDateTimeFactory
from homeassistant import config_entries
from homeassistant.components.version.const import (
DEFAULT_CONFIGURATION,
DEFAUL... | 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/version/test_sensor.py | tests/components/version/test_sensor.py | """The test for the version sensor platform."""
from __future__ import annotations
from freezegun.api import FrozenDateTimeFactory
from pyhaversion.exceptions import HaVersionException
import pytest
from homeassistant.core import HomeAssistant
from .common import MOCK_VERSION, mock_get_version_update, setup_version... | 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/version/test_config_flow.py | tests/components/version/test_config_flow.py | """Test the Version config flow."""
from unittest.mock import patch
from pyhaversion.consts import HaVersionChannel, HaVersionSource
from homeassistant import config_entries
from homeassistant.components.version.const import (
CONF_BETA,
CONF_BOARD,
CONF_CHANNEL,
CONF_IMAGE,
CONF_VERSION_SOURCE,
... | 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/version/__init__.py | tests/components/version/__init__.py | """Tests for the version component."""
| 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.