From 8fb4e0934e2a4e4433bcd6261ebe5456ef3ead92 Mon Sep 17 00:00:00 2001 From: Christopher Bailey Date: Fri, 21 Jan 2022 14:00:35 -0500 Subject: [PATCH] Fix UniFi Protect test warning (#64650) --- tests/components/unifiprotect/conftest.py | 4 ++++ tests/components/unifiprotect/test_sensor.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tests/components/unifiprotect/conftest.py b/tests/components/unifiprotect/conftest.py index cf29a97eabb..32ffc6db951 100644 --- a/tests/components/unifiprotect/conftest.py +++ b/tests/components/unifiprotect/conftest.py @@ -51,6 +51,10 @@ class MockBootstrap: self.liveviews = {} self.events = {} + def process_ws_packet(self, msg: WSSubscriptionMessage) -> None: + """Fake process method for tests.""" + pass + @dataclass class MockEntityFixture: diff --git a/tests/components/unifiprotect/test_sensor.py b/tests/components/unifiprotect/test_sensor.py index b586e5fbbfa..1f5624c30a9 100644 --- a/tests/components/unifiprotect/test_sensor.py +++ b/tests/components/unifiprotect/test_sensor.py @@ -40,6 +40,7 @@ from .conftest import ( assert_entity_counts, enable_entity, ids_from_device_description, + time_changed, ) @@ -569,3 +570,4 @@ async def test_sensor_update_alarm( state = hass.states.get(entity_id) assert state assert state.state == "smoke" + await time_changed(hass, 10)