diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2021-01-24 21:47:37 +0100 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2021-01-25 19:50:46 +0100 |
commit | 7f2133cc790180129c3f182241dec2576073642a (patch) | |
tree | d59a11e4a325d03147dd3374d11dc34f33f844d7 | |
parent | 8491d35eefb1d599ff8ef9d7fd4298f6acb4e26a (diff) |
tests/fprintd: Verify using no-identification device with 'any' finger
-rw-r--r-- | tests/fprintd.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/fprintd.py b/tests/fprintd.py index b16d34b..fd462af 100644 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -828,6 +828,35 @@ class FPrintdVirtualNoStorageDeviceBaseTest(FPrintdVirtualStorageDeviceBaseTest) device_driver = 'virtual_device' driver_name = 'Virtual device for debugging' +class FPrintdVirtualNoStorageDeviceTest(FPrintdVirtualNoStorageDeviceBaseTest): + + def check_verify_finger_match(self, image, expect_match): + self.device.VerifyStart('(s)', 'any') + self.send_image(image) + self.wait_for_result() + self.assertTrue(self._verify_stopped) + if expect_match: + self.assertEqual(self._last_result, 'verify-match') + else: + self.assertEqual(self._last_result, 'verify-no-match') + self.device.VerifyStop() + + def test_verify_any_finger_match_first_only(self): + self.device.Claim('(s)', 'testuser') + self.addCleanup(self.device.Release) + + enrolled, enroll_map = self.enroll_multiple_images() + self.check_verify_finger_match(enroll_map[enrolled[0]], expect_match=True) + self.check_verify_finger_match(enroll_map[enrolled[1]], expect_match=False) + self.check_verify_finger_match(enroll_map[enrolled[2]], expect_match=False) + + def test_verify_any_finger_no_match(self): + self.device.Claim('(s)', 'testuser') + self.addCleanup(self.device.Release) + + FPrintdVirtualDeviceClaimedTest.test_verify_any_finger_no_match(self) + + class FPrintdManagerTests(FPrintdVirtualDeviceBaseTest): def setUp(self): |