mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Avoid calling hass internals when adding mock config entry in Blink (#110290)
This commit is contained in:
parent
589e3952de
commit
932d930084
@ -108,7 +108,7 @@ async def test_service_pin_called_with_non_blink_device(
|
|||||||
other_mock_config_entry = MockConfigEntry(
|
other_mock_config_entry = MockConfigEntry(
|
||||||
title="Not Blink", domain=other_domain, entry_id=other_config_id
|
title="Not Blink", domain=other_domain, entry_id=other_config_id
|
||||||
)
|
)
|
||||||
await hass.config_entries.async_add(other_mock_config_entry)
|
other_mock_config_entry.add_to_hass(hass)
|
||||||
|
|
||||||
hass.config.is_allowed_path = Mock(return_value=True)
|
hass.config.is_allowed_path = Mock(return_value=True)
|
||||||
mock_blink_api.cameras = {CAMERA_NAME: AsyncMock()}
|
mock_blink_api.cameras = {CAMERA_NAME: AsyncMock()}
|
||||||
@ -145,7 +145,7 @@ async def test_service_update_called_with_non_blink_device(
|
|||||||
other_mock_config_entry = MockConfigEntry(
|
other_mock_config_entry = MockConfigEntry(
|
||||||
title="Not Blink", domain=other_domain, entry_id=other_config_id
|
title="Not Blink", domain=other_domain, entry_id=other_config_id
|
||||||
)
|
)
|
||||||
await hass.config_entries.async_add(other_mock_config_entry)
|
other_mock_config_entry.add_to_hass(hass)
|
||||||
|
|
||||||
device_entry = device_registry.async_get_or_create(
|
device_entry = device_registry.async_get_or_create(
|
||||||
config_entry_id=other_config_id,
|
config_entry_id=other_config_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user