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/purpleair/test_config_flow.py | tests/components/purpleair/test_config_flow.py | """Define tests for the PurpleAir config flow."""
from unittest.mock import AsyncMock, patch
from aiopurpleair.errors import InvalidApiKeyError, PurpleAirError
import pytest
from homeassistant.components.purpleair.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER
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/purpleair/conftest.py | tests/components/purpleair/conftest.py | """Define fixtures for PurpleAir tests."""
from collections.abc import Generator
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
from aiopurpleair.endpoints.sensors import NearbySensorResult
from aiopurpleair.models.sensors import GetSensorsResponse
import pytest
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/purpleair/__init__.py | tests/components/purpleair/__init__.py | """Tests for the PurpleAir 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/purpleair/fixtures/__init__.py | tests/components/purpleair/fixtures/__init__.py | """Define data fixtures."""
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sensibo/test_button.py | tests/components/sensibo/test_button.py | """The test for the sensibo button platform."""
from __future__ import annotations
from datetime import timedelta
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.button import DOMAIN as BUT... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sensibo/test_diagnostics.py | tests/components/sensibo/test_diagnostics.py | """Test Sensibo diagnostics."""
from __future__ import annotations
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from tests.components.diagnostics import get_diagnostics_for_config_ent... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sensibo/test_binary_sensor.py | tests/components/sensibo/test_binary_sensor.py | """The test for the sensibo binary sensor platform."""
from __future__ import annotations
from datetime import timedelta
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.config_entries import 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/sensibo/test_sensor.py | tests/components/sensibo/test_sensor.py | """The test for the sensibo sensor platform."""
from __future__ import annotations
from datetime import timedelta
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
from pysensibo.model import PureAQI
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.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/sensibo/test_switch.py | tests/components/sensibo/test_switch.py | """The test for the sensibo switch platform."""
from __future__ import annotations
from datetime import timedelta
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.switch import DOMAIN as SWI... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sensibo/test_entity.py | tests/components/sensibo/test_entity.py | """The test for the sensibo entity."""
from __future__ import annotations
from unittest.mock import MagicMock
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.climate import (
ATTR_FAN_MODE,
DOMAIN as CLIMATE_DOMAIN,
SERVICE_SET_FAN_MODE,
)
from homeassistant.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/sensibo/test_climate.py | tests/components/sensibo/test_climate.py | """The test for the sensibo climate platform."""
from __future__ import annotations
from datetime import datetime, timedelta
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from voluptuous import MultipleInvalid
from ho... | 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/sensibo/test_config_flow.py | tests/components/sensibo/test_config_flow.py | """Test the Sensibo config flow."""
from __future__ import annotations
from typing import Any
from unittest.mock import AsyncMock, MagicMock
from pysensibo import AuthenticationError, SensiboData, SensiboError
import pytest
from homeassistant import config_entries
from homeassistant.components.sensibo.const import ... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sensibo/test_select.py | tests/components/sensibo/test_select.py | """The test for the sensibo select platform."""
from __future__ import annotations
from datetime import timedelta
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.select import (
ATTR_OP... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sensibo/conftest.py | tests/components/sensibo/conftest.py | """Fixtures for the Sensibo integration."""
from __future__ import annotations
from collections.abc import AsyncGenerator, Generator
import json
from typing import Any
from unittest.mock import AsyncMock, MagicMock, patch
from pysensibo import SensiboClient, SensiboData
import pytest
from homeassistant.components.s... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sensibo/__init__.py | tests/components/sensibo/__init__.py | """Tests for the Sensibo integration."""
from __future__ import annotations
from homeassistant.const import CONF_API_KEY
ENTRY_CONFIG = {CONF_API_KEY: "1234567890"}
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sensibo/test_coordinator.py | tests/components/sensibo/test_coordinator.py | """The test for the sensibo coordinator."""
from __future__ import annotations
from datetime import timedelta
from typing import Any
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
from pysensibo.exceptions import AuthenticationError, SensiboError
from pysensibo.model import Sensi... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sensibo/test_update.py | tests/components/sensibo/test_update.py | """The test for the sensibo update platform."""
from __future__ import annotations
from datetime import timedelta
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.config_entries import ConfigEntry
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/sensibo/test_number.py | tests/components/sensibo/test_number.py | """The test for the sensibo number platform."""
from __future__ import annotations
from datetime import timedelta
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.number import (
ATTR_VA... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sensibo/test_init.py | tests/components/sensibo/test_init.py | """Test for Sensibo integration setup."""
from __future__ import annotations
from datetime import timedelta
from typing import Any
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
from pysensibo.model import SensiboData
import pytest
from homeassistant.components.sensibo.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/watergate/test_valve.py | tests/components/watergate/test_valve.py | """Tests for the Watergate valve platform."""
from collections.abc import Generator
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.valve import DOMAIN as VALVE_DOMAIN, ValveState
from homeassistant.const import ATTR_ENTITY_ID, SERVICE_CLOSE_VALVE, SERVICE_OPEN_VALVE
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/watergate/test_sensor.py | tests/components/watergate/test_sensor.py | """Tests for the Watergate sensor platform."""
from collections.abc import Generator
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import EntityCategory, Platform
from homeassistant.core import HomeAssistant
from homeassistant.he... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/watergate/test_config_flow.py | tests/components/watergate/test_config_flow.py | """Tests for the Watergate config flow."""
from collections.abc import Generator
import pytest
from watergate_local_api import WatergateApiException
from homeassistant.components.watergate.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import CONF_IP_ADDRESS, CONF_W... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/watergate/const.py | tests/components/watergate/const.py | """Constants for the Watergate tests."""
from watergate_local_api.models import DeviceState, NetworkingData, TelemetryData
from watergate_local_api.models.water_meter import WaterMeter
from homeassistant.const import CONF_IP_ADDRESS, CONF_NAME, CONF_WEBHOOK_ID
MOCK_WEBHOOK_ID = "webhook_id"
MOCK_CONFIG = {
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/watergate/conftest.py | tests/components/watergate/conftest.py | """Fixtures for watergate platform tests."""
from collections.abc import Generator
import pytest
from homeassistant.components.watergate.const import DOMAIN
from homeassistant.const import CONF_IP_ADDRESS
from .const import (
DEFAULT_DEVICE_STATE,
DEFAULT_NETWORKING_STATE,
DEFAULT_SERIAL_NUMBER,
DEF... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/watergate/__init__.py | tests/components/watergate/__init__.py | """Tests for the Watergate integration."""
from homeassistant.core import HomeAssistant
async def init_integration(hass: HomeAssistant, mock_entry) -> None:
"""Set up the Watergate integration in Home Assistant."""
mock_entry.add_to_hass(hass)
await hass.config_entries.async_setup(mock_entry.entry_id)
... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/watergate/test_event.py | tests/components/watergate/test_event.py | """Tests for the Watergate event entity platform."""
from collections.abc import Generator
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers 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/watergate/test_init.py | tests/components/watergate/test_init.py | """Tests for the Watergate integration init module."""
from collections.abc import Generator
from unittest.mock import patch
from homeassistant.components.valve import ValveState
from homeassistant.components.watergate.const import DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.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/sleep_as_android/test_diagnostics.py | tests/components/sleep_as_android/test_diagnostics.py | """Tests for Sleep as Android diagnostics."""
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 ClientSessionGenerator
async def 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/sleep_as_android/test_sensor.py | tests/components/sleep_as_android/test_sensor.py | """Test the Sleep as Android sensor platform."""
from collections.abc import Generator
from datetime import datetime
from http import HTTPStatus
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.config_entries import ConfigEntryState
from homeassistant.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/sleep_as_android/test_config_flow.py | tests/components/sleep_as_android/test_config_flow.py | """Test the Sleep as Android config flow."""
from unittest.mock import AsyncMock, patch
from homeassistant.components.sleep_as_android.const import DOMAIN
from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import CONF_WEBHOOK_ID
from homeassistant.core import HomeAssistant
from homeassistan... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sleep_as_android/conftest.py | tests/components/sleep_as_android/conftest.py | """Common fixtures for the Sleep as Android tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from homeassistant.components.sleep_as_android.const import DOMAIN
from homeassistant.const import CONF_WEBHOOK_ID
from tests.common import MockConfigEntry
@pytest.f... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sleep_as_android/__init__.py | tests/components/sleep_as_android/__init__.py | """Tests for the Sleep as Android 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/sleep_as_android/test_event.py | tests/components/sleep_as_android/test_event.py | """Test the Sleep as Android event platform."""
from collections.abc import Generator
from http import HTTPStatus
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.config_entries import ConfigEntryState
from homeassistant.const import STATE_UNKNOWN, Platf... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/sleep_as_android/test_init.py | tests/components/sleep_as_android/test_init.py | """Test the Sleep as Android integration setup."""
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
async def test_entry_setup_unload(
hass: HomeAssistant, config_entry: MockConfigEntry
) -> None:
"""Test integrat... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/counter/test_reproduce_state.py | tests/components/counter/test_reproduce_state.py | """Test reproduce state for Counter."""
import pytest
from homeassistant.core import HomeAssistant, State
from homeassistant.helpers.state import async_reproduce_state
from tests.common import async_mock_service
async def test_reproducing_states(
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
) -> None:... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/counter/common.py | tests/components/counter/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.counter import (
DOMAIN,
SERVICE_DECREMENT,
SERVICE_INCREMENT,
SERVICE_RESET,
)
from homeassistant.const import ATT... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/counter/__init__.py | tests/components/counter/__init__.py | """Tests for the counter 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/counter/test_init.py | tests/components/counter/test_init.py | """The tests for the counter component."""
import logging
from typing import Any
import pytest
from homeassistant.components.counter import (
ATTR_EDITABLE,
ATTR_INITIAL,
ATTR_MAXIMUM,
ATTR_MINIMUM,
ATTR_STEP,
CONF_ICON,
CONF_INITIAL,
CONF_MAXIMUM,
CONF_MINIMUM,
CONF_NAME,
... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/qnap_qsw/test_button.py | tests/components/qnap_qsw/test_button.py | """The sensor tests for the QNAP QSW platform."""
from unittest.mock import patch
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.const import ATTR_ENTITY_ID, STATE_UNKNOWN
from homeassistant.core import HomeAssistant
from .util import SYSTEM_COMMAND_MOCK, USERS_... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/qnap_qsw/test_diagnostics.py | tests/components/qnap_qsw/test_diagnostics.py | """The diagnostics tests for the QNAP QSW platform."""
from aioqsw.const import (
API_ANOMALY,
API_BUILD_NUMBER,
API_FAN1_SPEED,
API_MAX_SWITCH_TEMP,
API_NUMBER,
API_PRODUCT,
API_RESULT,
API_SWITCH_TEMP,
API_UPTIME,
API_VERSION,
QSD_ANOMALY,
QSD_BUILD_NUMBER,
QSD_FAN... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/qnap_qsw/test_binary_sensor.py | tests/components/qnap_qsw/test_binary_sensor.py | """The binary sensor tests for the QNAP QSW platform."""
import pytest
from homeassistant.components.qnap_qsw.const import ATTR_MESSAGE
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .util import async_init... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/qnap_qsw/test_sensor.py | tests/components/qnap_qsw/test_sensor.py | """The sensor tests for the QNAP QSW platform."""
from freezegun.api import FrozenDateTimeFactory
import pytest
from homeassistant.components.qnap_qsw.const import ATTR_MAX, DOMAIN
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry 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/qnap_qsw/util.py | tests/components/qnap_qsw/util.py | """Tests for the QNAP QSW integration."""
from unittest.mock import patch
from aioqsw.const import (
API_ANOMALY,
API_BUILD_NUMBER,
API_CHIP_ID,
API_CI_BRANCH,
API_CI_COMMIT,
API_CI_PIPELINE,
API_COMMIT_CPSS,
API_COMMIT_ISS,
API_DATE,
API_DESCRIPTION,
API_DOWNLOAD_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/qnap_qsw/test_config_flow.py | tests/components/qnap_qsw/test_config_flow.py | """Define tests for the QNAP QSW config flow."""
from unittest.mock import MagicMock, patch
from aioqsw.const import API_MAC_ADDR, API_PRODUCT, API_RESULT
from aioqsw.exceptions import LoginError, QswError
from homeassistant import config_entries
from homeassistant.components.qnap_qsw.const import DOMAIN
from homeas... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/qnap_qsw/__init__.py | tests/components/qnap_qsw/__init__.py | """Tests for the QNAP QSW 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/qnap_qsw/test_coordinator.py | tests/components/qnap_qsw/test_coordinator.py | """Define tests for the QNAP QSW coordinator."""
from unittest.mock import patch
from aioqsw.exceptions import APIError, QswError
from freezegun.api import FrozenDateTimeFactory
from homeassistant.components.qnap_qsw.const import DOMAIN
from homeassistant.components.qnap_qsw.coordinator import (
DATA_SCAN_INTERV... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/qnap_qsw/test_update.py | tests/components/qnap_qsw/test_update.py | """The sensor tests for the QNAP QSW platform."""
from unittest.mock import patch
from aioqsw.const import API_ERROR_CODE, API_ERROR_MESSAGE, API_RESULT, API_VERSION
from homeassistant.components.update import (
ATTR_BACKUP,
ATTR_IN_PROGRESS,
ATTR_INSTALLED_VERSION,
ATTR_LATEST_VERSION,
DOMAIN as... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/qnap_qsw/test_init.py | tests/components/qnap_qsw/test_init.py | """Define tests for the QNAP QSW init."""
from unittest.mock import patch
from aioqsw.exceptions import APIError
from homeassistant.components.qnap_qsw.const import DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from .util import CONFIG
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/homeassistant/test_exposed_entities.py | tests/components/homeassistant/test_exposed_entities.py | """Test Home Assistant exposed entities helper."""
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.homeassistant.exposed_entities import (
DATA_EXPOSED_ENTITIES,
ExposedEntities,
ExposedEntity,
async_expose_entity,
async_get_assistant_settings,
async_... | python | 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/test_scene.py | tests/components/homeassistant/test_scene.py | """Test Home Assistant scenes."""
from unittest.mock import patch
import pytest
import voluptuous as vol
from homeassistant.components.homeassistant import scene as ha_scene
from homeassistant.components.homeassistant.scene import EVENT_SCENE_RELOADED
from homeassistant.const import STATE_UNKNOWN
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/homeassistant/__init__.py | tests/components/homeassistant/__init__.py | """Tests for the Home Assistant integration to provide core functionality."""
| python | 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/test_repairs.py | tests/components/homeassistant/test_repairs.py | """Test the Homeassistant repairs module."""
from homeassistant.components.repairs import DOMAIN as REPAIRS_DOMAIN
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
from homeassistant.helpers import issue_registry as ir
from homeassistant.setup import async_setup_component
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/homeassistant/test_init.py | tests/components/homeassistant/test_init.py | """The tests for Core components."""
from unittest.mock import Mock, patch
import pytest
import voluptuous as vol
import yaml
from homeassistant import config, core as ha
from homeassistant.components.homeassistant import (
ATTR_ENTRY_ID,
ATTR_SAFE_MODE,
DOMAIN,
SERVICE_CHECK_CONFIG,
SERVICE_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/homeassistant/triggers/test_time.py | tests/components/homeassistant/triggers/test_time.py | """The tests for the time automation."""
from datetime import datetime, timedelta
from unittest.mock import Mock, patch
from freezegun.api import FrozenDateTimeFactory
import pytest
import voluptuous as vol
from homeassistant.components import automation
from homeassistant.components.homeassistant.triggers import ti... | 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/homeassistant/triggers/test_time_pattern.py | tests/components/homeassistant/triggers/test_time_pattern.py | """The tests for the time_pattern automation."""
from datetime import timedelta
from freezegun.api import FrozenDateTimeFactory
import pytest
import voluptuous as vol
from homeassistant.components import automation
from homeassistant.components.homeassistant.triggers import time_pattern
from homeassistant.const 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/homeassistant/triggers/test_numeric_state.py | tests/components/homeassistant/triggers/test_numeric_state.py | """The tests for numeric state automation."""
from datetime import timedelta
import logging
from unittest.mock import patch
from freezegun.api import FrozenDateTimeFactory
import pytest
import voluptuous as vol
from homeassistant.components import automation
from homeassistant.components.homeassistant.triggers impor... | 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/homeassistant/triggers/test_homeassistant.py | tests/components/homeassistant/triggers/test_homeassistant.py | """The tests for the Event automation."""
from unittest.mock import patch
import pytest
from homeassistant.components import automation
from homeassistant.core import CoreState, HomeAssistant
from homeassistant.helpers.typing import ConfigType
from homeassistant.setup import async_setup_component
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/homeassistant/triggers/test_state.py | tests/components/homeassistant/triggers/test_state.py | """The test for state automation."""
from datetime import timedelta
from unittest.mock import patch
from freezegun.api import FrozenDateTimeFactory
import pytest
from homeassistant.components import automation
from homeassistant.components.homeassistant.triggers import state as state_trigger
from homeassistant.const... | 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/homeassistant/triggers/conftest.py | tests/components/homeassistant/triggers/conftest.py | """Conftest for HA triggers."""
import pytest
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
def stub_blueprint_populate_autouse(stub_blueprint_populate: None) -> None:
"""Stub copying the blueprints to the config folder."""
| python | 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/triggers/__init__.py | tests/components/homeassistant/triggers/__init__.py | """Test core triggers."""
| python | 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/triggers/test_event.py | tests/components/homeassistant/triggers/test_event.py | """The tests for the Event automation."""
import pytest
from homeassistant.components import automation
from homeassistant.const import ATTR_ENTITY_ID, ENTITY_MATCH_ALL, SERVICE_TURN_OFF
from homeassistant.core import Context, HomeAssistant, ServiceCall
from homeassistant.setup import async_setup_component
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/ruckus_unleashed/test_config_flow.py | tests/components/ruckus_unleashed/test_config_flow.py | """Test the config flow."""
from copy import deepcopy
from datetime import timedelta
from unittest.mock import AsyncMock, patch
from aioruckus.const import (
ERROR_CONNECT_TEMPORARY,
ERROR_CONNECT_TIMEOUT,
ERROR_LOGIN_INCORRECT,
)
from aioruckus.exceptions import AuthenticationError
from homeassistant 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/ruckus_unleashed/__init__.py | tests/components/ruckus_unleashed/__init__.py | """Tests for the Ruckus integration."""
from __future__ import annotations
from unittest.mock import AsyncMock, patch
from aioruckus import AjaxSession, RuckusAjaxApi
from homeassistant.components.ruckus_unleashed.const import (
API_AP_DEVNAME,
API_AP_MAC,
API_AP_MODEL,
API_AP_SERIALNUMBER,
API_... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/ruckus_unleashed/test_device_tracker.py | tests/components/ruckus_unleashed/test_device_tracker.py | """The sensor tests for the Ruckus platform."""
from datetime import timedelta
from unittest.mock import AsyncMock
from aioruckus.const import ERROR_CONNECT_EOF, ERROR_LOGIN_INCORRECT
from aioruckus.exceptions import AuthenticationError
from homeassistant.components.ruckus_unleashed import DOMAIN
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/ruckus_unleashed/test_init.py | tests/components/ruckus_unleashed/test_init.py | """Test the Ruckus config flow."""
from unittest.mock import AsyncMock
from aioruckus.const import ERROR_CONNECT_TIMEOUT, ERROR_LOGIN_INCORRECT
from aioruckus.exceptions import AuthenticationError
from homeassistant.components.ruckus_unleashed import DOMAIN, MANUFACTURER
from homeassistant.components.ruckus_unleashe... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/button/test_device_trigger.py | tests/components/button/test_device_trigger.py | """The tests for Button device triggers."""
from __future__ import annotations
import pytest
from pytest_unordered import unordered
from homeassistant.components import automation
from homeassistant.components.button import DOMAIN
from homeassistant.components.device_automation import DeviceAutomationType
from homea... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/button/const.py | tests/components/button/const.py | """Constants for the button entity component tests."""
TEST_DOMAIN = "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/button/conftest.py | tests/components/button/conftest.py | """Fixtures for the button entity component tests."""
import logging
import pytest
from homeassistant.components.button import DOMAIN, ButtonEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import 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/button/__init__.py | tests/components/button/__init__.py | """The tests for the Button 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/button/test_device_action.py | tests/components/button/test_device_action.py | """The tests for Button device actions."""
import pytest
from pytest_unordered import unordered
from homeassistant.components import automation
from homeassistant.components.button import DOMAIN
from homeassistant.components.device_automation import DeviceAutomationType
from homeassistant.const import EntityCategory
... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/button/test_init.py | tests/components/button/test_init.py | """The tests for the Button component."""
from collections.abc import Generator
from datetime import timedelta
from unittest.mock import MagicMock
from freezegun.api import FrozenDateTimeFactory
import pytest
from homeassistant.components.button import (
DOMAIN,
SERVICE_PRESS,
ButtonDeviceClass,
Butt... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/button/test_trigger.py | tests/components/button/test_trigger.py | """Test button trigger."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
from homeassistant.const import (
ATTR_LABEL_ID,
CONF_ENTITY_ID,
STATE_UNAVAILABLE,
STATE_UNKNOWN,
)
from homeassistant.core import HomeAssistant, ServiceCall
from tests.components 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/epson/test_media_player.py | tests/components/epson/test_media_player.py | """Tests for the epson integration."""
from datetime import timedelta
from unittest.mock import patch
from freezegun.api import FrozenDateTimeFactory
from homeassistant.components.epson.const import CONF_CONNECTION_TYPE, DOMAIN, HTTP
from homeassistant.const import CONF_HOST
from homeassistant.core import HomeAssist... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/epson/test_config_flow.py | tests/components/epson/test_config_flow.py | """Test the epson config flow."""
from unittest.mock import patch
from epson_projector.const import PWR_OFF_STATE
from homeassistant import config_entries
from homeassistant.components.epson.const import CONF_CONNECTION_TYPE, DOMAIN, HTTP
from homeassistant.const import CONF_HOST, CONF_NAME, STATE_UNAVAILABLE
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/epson/__init__.py | tests/components/epson/__init__.py | """Tests for the epson 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/epson/test_init.py | tests/components/epson/test_init.py | """Test the epson init."""
from unittest.mock import patch
from homeassistant.components.epson.const import CONF_CONNECTION_TYPE, DOMAIN
from homeassistant.const import CONF_HOST
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
async def test_migrate_entry(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/totalconnect/test_button.py | tests/components/totalconnect/test_button.py | """Tests for the TotalConnect buttons."""
from unittest.mock import AsyncMock, patch
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.const import ATTR_ENTITY_ID, Platform
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/totalconnect/test_diagnostics.py | tests/components/totalconnect/test_diagnostics.py | """Test TotalConnect diagnostics."""
from unittest.mock import AsyncMock
from syrupy.assertion import SnapshotAssertion
from homeassistant.core import HomeAssistant
from . import setup_integration
from tests.common import MockConfigEntry
from tests.components.diagnostics import get_diagnostics_for_config_entry
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/totalconnect/test_binary_sensor.py | tests/components/totalconnect/test_binary_sensor.py | """Tests for the TotalConnect binary sensor."""
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/totalconnect/test_alarm_control_panel.py | tests/components/totalconnect/test_alarm_control_panel.py | """Tests for the TotalConnect alarm control panel device."""
from datetime import timedelta
from unittest.mock import AsyncMock, patch
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from total_connect_client import ArmingState, ArmType
from total_connect_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/totalconnect/test_config_flow.py | tests/components/totalconnect/test_config_flow.py | """Tests for the TotalConnect config flow."""
from unittest.mock import AsyncMock, patch
from total_connect_client.exceptions import AuthenticationError
from homeassistant.components.totalconnect.const import (
AUTO_BYPASS,
CODE_REQUIRED,
CONF_USERCODES,
DOMAIN,
)
from homeassistant.config_entries 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/totalconnect/const.py | tests/components/totalconnect/const.py | """Constants for the Total Connect tests."""
LOCATION_ID = 1234567
CODE = "7890"
USERNAME = "username@me.com"
PASSWORD = "password"
USERCODES = {LOCATION_ID: "7890"}
| python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/totalconnect/conftest.py | tests/components/totalconnect/conftest.py | """Configure py.test."""
from collections.abc import Generator
from typing import Any
from unittest.mock import AsyncMock, patch
import pytest
from total_connect_client import ArmingState, TotalConnectClient
from total_connect_client.device import TotalConnectDevice
from total_connect_client.location import TotalConn... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/totalconnect/__init__.py | tests/components/totalconnect/__init__.py | """Tests for the totalconnect component."""
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 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/totalconnect/test_init.py | tests/components/totalconnect/test_init.py | """Tests for the TotalConnect init process."""
from unittest.mock import patch
from total_connect_client.exceptions import AuthenticationError
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from . import setup_integration
from tests.common import MockConfigEn... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/google_assistant/test_button.py | tests/components/google_assistant/test_button.py | """Test buttons."""
from unittest.mock import patch
import pytest
from homeassistant.components import google_assistant as ga
from homeassistant.core import Context, HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.setup import async_setup_component
from .test_http import DUM... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/google_assistant/test_diagnostics.py | tests/components/google_assistant/test_diagnostics.py | """Test diagnostics."""
from unittest.mock import patch
import pytest
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant import setup
from homeassistant.components import google_assistant as ga, switch
from homeassistant.const import Platform
from homeassistant.core 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/google_assistant/test_trait.py | tests/components/google_assistant/test_trait.py | """Tests for the Google Assistant traits."""
from datetime import datetime, timedelta
from typing import Any
from unittest.mock import ANY, patch
from freezegun.api import FrozenDateTimeFactory
import pytest
from homeassistant.components import (
alarm_control_panel,
binary_sensor,
button,
camera,
... | 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/google_assistant/test_http.py | tests/components/google_assistant/test_http.py | """Test Google http services."""
from datetime import UTC, datetime, timedelta
from http import HTTPStatus
import json
import os
from pathlib import Path
from typing import Any
from unittest.mock import ANY, patch
from uuid import uuid4
import py
import pytest
from homeassistant.components.google_assistant import GO... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/google_assistant/test_google_assistant.py | tests/components/google_assistant/test_google_assistant.py | """The tests for the Google Assistant component."""
from http import HTTPStatus
import json
from unittest.mock import patch
from aiohttp.hdrs import AUTHORIZATION
from aiohttp.test_utils import TestClient
import pytest
from homeassistant import const, core, setup
from homeassistant.components import (
google_ass... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/google_assistant/test_report_state.py | tests/components/google_assistant/test_report_state.py | """Test Google report state."""
from datetime import datetime, timedelta
from http import HTTPStatus
from unittest.mock import AsyncMock, patch
import pytest
from homeassistant.components.google_assistant import error, report_state
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_se... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/google_assistant/test_logbook.py | tests/components/google_assistant/test_logbook.py | """The tests for Google Assistant logbook."""
from homeassistant.components.google_assistant.const import (
DOMAIN,
EVENT_COMMAND_RECEIVED,
SOURCE_CLOUD,
SOURCE_LOCAL,
)
from homeassistant.const import ATTR_ENTITY_ID, ATTR_FRIENDLY_NAME
from homeassistant.core import HomeAssistant
from homeassistant.se... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/google_assistant/__init__.py | tests/components/google_assistant/__init__.py | """Tests for the Google Assistant integration."""
from unittest.mock import MagicMock
from homeassistant.components.google_assistant import http
from homeassistant.core import HomeAssistant
def mock_google_config_store(agent_user_ids=None):
"""Fake a storage for google assistant."""
store = MagicMock(spec=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/google_assistant/test_smart_home.py | tests/components/google_assistant/test_smart_home.py | """Test Google Smart Home."""
import asyncio
from types import SimpleNamespace
from unittest.mock import ANY, patch
import pytest
from pytest_unordered import unordered
from homeassistant.components.camera import CameraEntityFeature
from homeassistant.components.climate import ATTR_MAX_TEMP, ATTR_MIN_TEMP, HVACMode
... | 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/google_assistant/test_data_redaction.py | tests/components/google_assistant/test_data_redaction.py | """Test data redaction helpers."""
import json
from homeassistant.components.google_assistant.data_redaction import async_redact_msg
from tests.common import load_fixture
def test_redact_msg() -> None:
"""Test async_redact_msg."""
messages = json.loads(load_fixture("data_redaction.json", "google_assistant"... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/google_assistant/test_init.py | tests/components/google_assistant/test_init.py | """The tests for google-assistant init."""
from http import HTTPStatus
from homeassistant.components import google_assistant as ga
from homeassistant.core import Context, HomeAssistant
from homeassistant.setup import async_setup_component
from .test_http import DUMMY_CONFIG
from tests.common import MockConfigEntry
... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/google_assistant/test_helpers.py | tests/components/google_assistant/test_helpers.py | """Test Google Assistant helpers."""
from datetime import timedelta
from http import HTTPStatus
from unittest.mock import Mock, call, patch
import pytest
from homeassistant.components.google_assistant import helpers
from homeassistant.components.google_assistant.const import (
EVENT_COMMAND_RECEIVED,
NOT_EXP... | python | Apache-2.0 | 6cae1821fb77e785a8aebb48dfc72ea5081b8975 | 2026-01-04T14:38:15.504802Z | false |
home-assistant/core | https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/tests/components/radiotherm/test_config_flow.py | tests/components/radiotherm/test_config_flow.py | """Test the Radio Thermostat config flow."""
from unittest.mock import MagicMock, patch
from radiotherm import CommonThermostat
from radiotherm.validate import RadiothermTstatError
from homeassistant import config_entries
from homeassistant.components.radiotherm.const import DOMAIN
from homeassistant.const import 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/radiotherm/__init__.py | tests/components/radiotherm/__init__.py | """Tests for the Radio Thermostat 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/surepetcare/test_binary_sensor.py | tests/components/surepetcare/test_binary_sensor.py | """The tests for the Sure Petcare binary sensor platform."""
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from . import HOUSEHOLD_ID, HUB_ID
from tests.common import MockConfigEntry
EXPECTED_ENTITY_IDS = {
"binary_sensor.pet_flap_connectivity": f"{HOUSEHOL... | 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.