mirror of
https://github.com/home-assistant/core.git
synced 2026-07-03 12:46:09 +01:00
7e805f2f2a
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
34 lines
884 B
Python
34 lines
884 B
Python
"""Tests for the saj integration."""
|
|
|
|
from homeassistant.components.saj.const import CONNECTION_TYPES
|
|
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_TYPE, CONF_USERNAME
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
MOCK_USER_INPUT_ETHERNET = {
|
|
CONF_HOST: "192.168.1.100",
|
|
CONF_TYPE: CONNECTION_TYPES[0],
|
|
}
|
|
|
|
MOCK_USER_INPUT_WIFI = {
|
|
CONF_HOST: "192.168.1.100",
|
|
CONF_TYPE: CONNECTION_TYPES[1],
|
|
CONF_USERNAME: "admin",
|
|
CONF_PASSWORD: "password",
|
|
}
|
|
|
|
MOCK_SERIAL_NUMBER = "TEST123456789"
|
|
|
|
|
|
async def setup_integration(
|
|
hass: HomeAssistant, config_entry: MockConfigEntry
|
|
) -> MockConfigEntry:
|
|
"""Set up the integration for testing."""
|
|
config_entry.add_to_hass(hass)
|
|
|
|
await hass.config_entries.async_setup(config_entry.entry_id)
|
|
await hass.async_block_till_done()
|
|
|
|
return config_entry
|