From 4a05f5ec06a444d0ad4dec53aada940ad643e5bc Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 2 May 2024 08:47:44 +1200 Subject: [PATCH] time was already imported --- tests/test_device.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_device.py b/tests/test_device.py index c525addfc8..0e41f2096d 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -91,7 +91,7 @@ async def test_refreshes_state_if_no_cached_state_exists(self): self.subject.async_refresh.assert_awaited() async def test_detection_returns_none_when_device_type_not_detected(self): - self.subject._cached_state = {"2": False, "updated_at": time.time()} + self.subject._cached_state = {"2": False, "updated_at": time()} self.assertEqual(await self.subject.async_inferred_type(), None) async def test_refreshes_when_there_is_no_pending_reset(self): @@ -136,7 +136,7 @@ async def test_refresh_retries_up_to_eleven_times(self): async def test_refresh_clears_cache_after_allowed_failures(self): self.subject._cached_state = {"1": True} self.subject._pending_updates = { - "1": {"value": False, "updated_at": time.time(), "sent": True} + "1": {"value": False, "updated_at": time(), "sent": True} } self.mock_api().status.side_effect = [ Exception("Error"), @@ -233,7 +233,7 @@ async def test_api_protocol_version_is_not_rotated_when_not_auto(self): def test_reset_cached_state_clears_cached_state_and_pending_updates(self): self.subject._cached_state = {"1": True, "updated_at": time()} self.subject._pending_updates = { - "1": {"value": False, "updated_at": time.time(), "sent": True} + "1": {"value": False, "updated_at": time(), "sent": True} } self.subject._reset_cached_state()