Просмотр исходного кода

Fix device tests after addition of protocol version 3.2

Jason Rumney 3 лет назад
Родитель
Сommit
c124f4d72e
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      tests/test_device.py

+ 4 - 2
tests/test_device.py

@@ -164,11 +164,13 @@ class TestDevice(IsolatedAsyncioTestCase):
             Exception("Error"),
             Exception("Error"),
             Exception("Error"),
+            Exception("Error"),
+            Exception("Error"),
         ]
         self.subject.refresh()
 
         self.subject._api.set_version.assert_has_calls(
-            [call(3.1), call(3.3), call(3.1)]
+            [call(3.1), call(3.2), call(3.3), call(3.1)]
         )
 
     def test_api_protocol_version_is_stable_once_successful(self):
@@ -188,7 +190,7 @@ class TestDevice(IsolatedAsyncioTestCase):
         self.subject.refresh()
         self.subject.refresh()
 
-        self.subject._api.set_version.assert_has_calls([call(3.1), call(3.3)])
+        self.subject._api.set_version.assert_has_calls([call(3.1), call(3.2)])
 
     def test_reset_cached_state_clears_cached_state_and_pending_updates(self):
         self.subject._cached_state = {"1": True, "updated_at": time()}