Add 100% coverage of Reolink button platform (#124380)
* Add 100% button coverage * review comments * fix * Use SERVICE_PRESS constant * Use DOMAIN instead of const.DOMAIN * styling * User entity_registry_enabled_by_default fixture * fixes * Split out ptz_move test * use SERVICE_PTZ_MOVE constant
This commit is contained in:
parent
fb5afff9d5
commit
4b111008df
7 changed files with 164 additions and 57 deletions
|
@ -6,8 +6,8 @@ from unittest.mock import AsyncMock, MagicMock, patch
|
|||
import pytest
|
||||
from reolink_aio.api import Chime
|
||||
|
||||
from homeassistant.components.reolink import const
|
||||
from homeassistant.components.reolink.config_flow import DEFAULT_PROTOCOL
|
||||
from homeassistant.components.reolink.const import CONF_USE_HTTPS, DOMAIN
|
||||
from homeassistant.const import (
|
||||
CONF_HOST,
|
||||
CONF_PASSWORD,
|
||||
|
@ -137,14 +137,14 @@ def reolink_platforms() -> Generator[None]:
|
|||
def config_entry(hass: HomeAssistant) -> MockConfigEntry:
|
||||
"""Add the reolink mock config entry to hass."""
|
||||
config_entry = MockConfigEntry(
|
||||
domain=const.DOMAIN,
|
||||
domain=DOMAIN,
|
||||
unique_id=format_mac(TEST_MAC),
|
||||
data={
|
||||
CONF_HOST: TEST_HOST,
|
||||
CONF_USERNAME: TEST_USERNAME,
|
||||
CONF_PASSWORD: TEST_PASSWORD,
|
||||
CONF_PORT: TEST_PORT,
|
||||
const.CONF_USE_HTTPS: TEST_USE_HTTPS,
|
||||
CONF_USE_HTTPS: TEST_USE_HTTPS,
|
||||
},
|
||||
options={
|
||||
CONF_PROTOCOL: DEFAULT_PROTOCOL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue