From 47bd3f7fbb24429099dd9bb37c1e97b809cd48be Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 27 Mar 2020 16:26:28 +0100 Subject: [PATCH] tests/fprintd: Fix test_enroll_invalid_storage_dir test enroll_image() was always waiting for enroll-completed rather than for what the caller expected as the result. ====================================================================== FAIL: test_enroll_invalid_storage_dir (__main__.FPrintdVirtualDeviceClaimedTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/hadess/Projects/jhbuild/fprintd/tests/fprintd.py", line 661, in test_enroll_invalid_storage_dir self.enroll_image('whorl', expected_result='enroll-failed') File "/home/hadess/Projects/jhbuild/fprintd/tests/fprintd.py", line 384, in enroll_image self.wait_for_result('enroll-completed') File "/home/hadess/Projects/jhbuild/fprintd/tests/fprintd.py", line 373, in wait_for_result self.assertEqual(self._last_result, expected) AssertionError: 'enroll-failed' != 'enroll-completed' - enroll-failed + enroll-completed --- tests/fprintd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fprintd.py b/tests/fprintd.py index 60471e3..0c771fa 100755 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -381,7 +381,7 @@ class FPrintdVirtualDeviceBaseTest(FPrintdTest): if stage < stages - 1: self.wait_for_result('enroll-stage-passed') else: - self.wait_for_result('enroll-completed') + self.wait_for_result(expected_result) self.device.EnrollStop() self.assertEqual(self._last_result, expected_result)