hass-core/tests/components/aquacell/__init__.py
Jordi 23fb4b50c9
Add brand selection to support additional brands who use the same API for AquaCell integration (#121817)
* Support harvey brand

* Update tests

* Moved the brand selection step to the same step as credentials

* Update tests/components/aquacell/test_init.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-17 20:45:24 +02:00

45 lines
1.1 KiB
Python

"""Tests for the Aquacell integration."""
from aioaquacell import Brand
from homeassistant.components.aquacell.const import (
CONF_BRAND,
CONF_REFRESH_TOKEN,
CONF_REFRESH_TOKEN_CREATION_TIME,
)
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
TEST_CONFIG_ENTRY = {
CONF_EMAIL: "test@test.com",
CONF_PASSWORD: "test-password",
CONF_REFRESH_TOKEN: "refresh-token",
CONF_REFRESH_TOKEN_CREATION_TIME: 0,
CONF_BRAND: Brand.AQUACELL,
}
TEST_CONFIG_ENTRY_WITHOUT_BRAND = {
CONF_EMAIL: "test@test.com",
CONF_PASSWORD: "test-password",
CONF_REFRESH_TOKEN: "refresh-token",
CONF_REFRESH_TOKEN_CREATION_TIME: 0,
}
TEST_USER_INPUT = {
CONF_EMAIL: "test@test.com",
CONF_PASSWORD: "test-password",
CONF_BRAND: "aquacell",
}
DSN = "DSN"
async def setup_integration(hass: HomeAssistant, config_entry: MockConfigEntry) -> None:
"""Fixture for setting up the component."""
config_entry.add_to_hass(hass)
await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()