Browse Source

Tests: remove obsolete pending_reset tests.

pending_reset was removed years ago when the integration was changed
to be push by default rather than polled.
The tests continued to work because the initial cached_state with just an
updated_at entry caused has_returned_state to return false.
Since that condition was changed in the last commit to support devices
that do not return any state, the tests now fail. Since they are obsolete,
it is better to remove them than update.
Jason Rumney 1 year ago
parent
commit
7eae6566b0
1 changed files with 0 additions and 18 deletions
  1. 0 18
      tests/test_device.py

+ 0 - 18
tests/test_device.py

@@ -97,24 +97,6 @@ class TestDevice(IsolatedAsyncioTestCase):
         self.subject._cached_state = {"192": False, "updated_at": time()}
         self.assertEqual(await self.subject.async_inferred_type(), None)
 
-    async def test_refreshes_when_there_is_no_pending_reset(self):
-        self.subject._cached_state = {"updated_at": time() - 19}
-        self.mock_api().status.return_value = {"dps": {"1": "called"}}
-
-        await self.subject.async_refresh()
-
-        self.mock_api().status.assert_called_once()
-        self.assertEqual(self.subject._cached_state["1"], "called")
-
-    async def test_refreshes_when_there_is_expired_pending_reset(self):
-        self.subject._cached_state = {"updated_at": time() - 20}
-        self.mock_api().status.return_value = {"dps": {"1": "called"}}
-
-        await self.subject.async_refresh()
-
-        self.mock_api().status.assert_called_once()
-        self.assertEqual(self.subject._cached_state["1"], "called")
-
     async def test_refresh_retries_up_to_eleven_times(self):
         self.subject._api_protocol_working = False
         self.mock_api().status.side_effect = [