From b3bf4ac1a3f74585478bc663a06ea9fe51a1018b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 18 Dec 2020 01:04:56 +0100 Subject: [PATCH] tests/fprintd: Unset the values we monitor for results on wait_for_result We need to ensure those assume the value we want after waiting --- tests/fprintd.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/fprintd.py b/tests/fprintd.py index 448f787..cc163eb 100644 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -579,6 +579,8 @@ class FPrintdVirtualDeviceBaseTest(FPrintdVirtualImageDeviceBaseTests): super().tearDown() def wait_for_result(self, expected=None, max_wait=-1): + self._last_result = None + self._verify_stopped = False self._abort = False if max_wait > 0: @@ -2200,9 +2202,12 @@ class FPrintdVirtualDeviceVerificationTests(FPrintdVirtualDeviceBaseTest): self.assertTrue(self._verify_stopped) self.assertEqual(self._last_result, 'verify-match') + self.assertTrue(self.finger_present) self.send_error(con=con) - self.wait_for_result(max_wait=200, expected='verify-match') + self.wait_for_result(max_wait=200) + self.assertIsNone(self._last_result) + self.assertFalse(self.finger_present) def test_verify_stop_restarts_immediately(self): self.send_image('tented_arch') @@ -2272,7 +2277,9 @@ class FPrintdVirtualDeviceStorageVerificationUtils(object): self.assertTrue(self._verify_stopped) self.assertEqual(self._last_result, 'verify-match') - self.wait_for_result(max_wait=200, expected='verify-match') + self.wait_for_result(max_wait=200) + self.assertIsNone(self._last_result) + self.assertFalse(self.finger_present) class FPrintdVirtualDeviceStorageVerificationTests(FPrintdVirtualStorageDeviceBaseTest, FPrintdVirtualDeviceStorageVerificationUtils,