Skip to content

Commit

Permalink
time was already imported
Browse files Browse the repository at this point in the history
  • Loading branch information
make-all committed May 1, 2024
1 parent 982ba3d commit 4a05f5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 4a05f5e

Please sign in to comment.