Commit 27f0b64d authored by Marco Trevisan's avatar Marco Trevisan Committed by Bastien Nocera
Browse files

tests/fprintd: Add tests for verification through finger id

parent f4ee2f86
...@@ -687,6 +687,47 @@ class FPrintdVirtualDeviceClaimedTest(FPrintdVirtualDeviceBaseTest): ...@@ -687,6 +687,47 @@ class FPrintdVirtualDeviceClaimedTest(FPrintdVirtualDeviceBaseTest):
with self.assertFprintError('NoActionInProgress'): with self.assertFprintError('NoActionInProgress'):
self.device.VerifyStop() self.device.VerifyStop()
def test_verify_finger_match(self):
self.enroll_image('whorl', finger='left-thumb')
self.device.VerifyStart('(s)', 'left-thumb')
self.send_image('whorl')
self.wait_for_result()
self.assertTrue(self._verify_stopped)
self.assertEqual(self._last_result, 'verify-match')
self.device.VerifyStop()
def test_verify_finger_no_match(self):
self.enroll_image('whorl', finger='left-thumb')
self.device.VerifyStart('(s)', 'left-thumb')
self.send_image('tented_arch')
self.wait_for_result()
self.assertTrue(self._verify_stopped)
self.assertEqual(self._last_result, 'verify-no-match')
self.device.VerifyStop()
def test_verify_wrong_finger_match(self):
self.enroll_image('whorl', finger='left-thumb')
self.device.VerifyStart('(s)', 'left-toe')
self.send_image('whorl')
self.wait_for_result()
self.assertTrue(self._verify_stopped)
self.assertEqual(self._last_result, 'verify-match')
self.device.VerifyStop()
def test_verify_wrong_finger_no_match(self):
self.enroll_image('whorl', finger='right-thumb')
self.device.VerifyStart('(s)', 'right-toe')
self.send_image('tented_arch')
self.wait_for_result()
self.assertTrue(self._verify_stopped)
self.assertEqual(self._last_result, 'verify-no-match')
self.device.VerifyStop()
def test_verify_finger_not_enrolled(self):
self.enroll_image('whorl', finger='left-thumb')
with self.assertFprintError('NoEnrolledPrints'):
self.device.VerifyStart('(s)', 'right-thumb')
def test_unallowed_enroll_start(self): def test_unallowed_enroll_start(self):
self._polkitd_obj.SetAllowed(['']) self._polkitd_obj.SetAllowed([''])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment