mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
fixed uncaught exceptions for tradfri (#33550)
was caused by device_info being mocks, so write to storage failed
This commit is contained in:
parent
3db9d6a6aa
commit
f2dad7905d
@ -155,11 +155,15 @@ def mock_light(test_features={}, test_state={}, n=0):
|
|||||||
"""Mock a tradfri light."""
|
"""Mock a tradfri light."""
|
||||||
mock_light_data = Mock(**test_state)
|
mock_light_data = Mock(**test_state)
|
||||||
|
|
||||||
|
dev_info_mock = MagicMock()
|
||||||
|
dev_info_mock.manufacturer = "manufacturer"
|
||||||
|
dev_info_mock.model_number = "model"
|
||||||
|
dev_info_mock.firmware_version = "1.2.3"
|
||||||
mock_light = Mock(
|
mock_light = Mock(
|
||||||
id=f"mock-light-id-{n}",
|
id=f"mock-light-id-{n}",
|
||||||
reachable=True,
|
reachable=True,
|
||||||
observe=Mock(),
|
observe=Mock(),
|
||||||
device_info=MagicMock(),
|
device_info=dev_info_mock,
|
||||||
)
|
)
|
||||||
mock_light.name = f"tradfri_light_{n}"
|
mock_light.name = f"tradfri_light_{n}"
|
||||||
|
|
||||||
|
@ -56,11 +56,6 @@ IGNORE_UNCAUGHT_EXCEPTIONS = [
|
|||||||
"tests.components.tplink.test_init",
|
"tests.components.tplink.test_init",
|
||||||
"test_configuring_devices_from_multiple_sources",
|
"test_configuring_devices_from_multiple_sources",
|
||||||
),
|
),
|
||||||
("tests.components.tradfri.test_light", "test_light"),
|
|
||||||
("tests.components.tradfri.test_light", "test_light_observed"),
|
|
||||||
("tests.components.tradfri.test_light", "test_light_available"),
|
|
||||||
("tests.components.tradfri.test_light", "test_turn_on"),
|
|
||||||
("tests.components.tradfri.test_light", "test_turn_off"),
|
|
||||||
("tests.components.unifi_direct.test_device_tracker", "test_get_scanner"),
|
("tests.components.unifi_direct.test_device_tracker", "test_get_scanner"),
|
||||||
("tests.components.upnp.test_init", "test_async_setup_entry_default"),
|
("tests.components.upnp.test_init", "test_async_setup_entry_default"),
|
||||||
("tests.components.upnp.test_init", "test_async_setup_entry_port_mapping"),
|
("tests.components.upnp.test_init", "test_async_setup_entry_port_mapping"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user