mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Remove debug option in unifiprotect tests (#143296)
This commit is contained in:
parent
37769b94cd
commit
961f8afe53
@ -407,7 +407,7 @@ async def test_binary_sensor_update_mount_type_garage(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test binary_sensor motion entity."""
|
"""Test binary_sensor motion entity."""
|
||||||
|
|
||||||
await init_entry(hass, ufp, [sensor_all], debug=True)
|
await init_entry(hass, ufp, [sensor_all])
|
||||||
assert_entity_counts(hass, Platform.BINARY_SENSOR, 11, 11)
|
assert_entity_counts(hass, Platform.BINARY_SENSOR, 11, 11)
|
||||||
|
|
||||||
_, entity_id = ids_from_device_description(
|
_, entity_id = ids_from_device_description(
|
||||||
|
@ -25,7 +25,6 @@ from homeassistant.const import Platform
|
|||||||
from homeassistant.core import HomeAssistant, split_entity_id
|
from homeassistant.core import HomeAssistant, split_entity_id
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
from homeassistant.helpers.entity import EntityDescription
|
from homeassistant.helpers.entity import EntityDescription
|
||||||
from homeassistant.setup import async_setup_component
|
|
||||||
from homeassistant.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, async_fire_time_changed
|
from tests.common import MockConfigEntry, async_fire_time_changed
|
||||||
@ -167,7 +166,6 @@ async def init_entry(
|
|||||||
ufp: MockUFPFixture,
|
ufp: MockUFPFixture,
|
||||||
devices: Sequence[ProtectAdoptableDeviceModel],
|
devices: Sequence[ProtectAdoptableDeviceModel],
|
||||||
regenerate_ids: bool = True,
|
regenerate_ids: bool = True,
|
||||||
debug: bool = False,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize Protect entry with given devices."""
|
"""Initialize Protect entry with given devices."""
|
||||||
|
|
||||||
@ -175,14 +173,6 @@ async def init_entry(
|
|||||||
for device in devices:
|
for device in devices:
|
||||||
add_device(ufp.api.bootstrap, device, regenerate_ids)
|
add_device(ufp.api.bootstrap, device, regenerate_ids)
|
||||||
|
|
||||||
if debug:
|
|
||||||
assert await async_setup_component(hass, "logger", {"logger": {}})
|
|
||||||
await hass.services.async_call(
|
|
||||||
"logger",
|
|
||||||
"set_level",
|
|
||||||
{"homeassistant.components.unifiprotect": "DEBUG"},
|
|
||||||
blocking=True,
|
|
||||||
)
|
|
||||||
await hass.config_entries.async_setup(ufp.entry.entry_id)
|
await hass.config_entries.async_setup(ufp.entry.entry_id)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user