mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
device: Always report selected finger if there is only one
If the user specified "any" finger, then we would mirror this back even if there is only one finger available. Change it so that we act as if that finger was passed explicitly, meaning we use the "verify" method and also send the signal for the selected finger accordingly.
This commit is contained in:
committed by
Benjamin Berg
parent
02468366b2
commit
fc65055279
@ -2004,14 +2004,14 @@ class FPrintdVirtualDeviceClaimedTest(FPrintdVirtualDeviceBaseTest):
|
||||
self.wait_for_result()
|
||||
self.assertTrue(self._verify_stopped)
|
||||
self.assertEqual(self._last_result, 'verify-match')
|
||||
self.assertEqual(self._selected_finger, 'any')
|
||||
self.assertEqual(self._selected_finger, 'left-thumb')
|
||||
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.assertVerifyNoMatch(selected_finger='any')
|
||||
self.assertVerifyNoMatch(selected_finger='right-thumb')
|
||||
self.device.VerifyStop()
|
||||
|
||||
def test_verify_any_finger_match(self):
|
||||
@ -2047,9 +2047,9 @@ class FPrintdVirtualDeviceClaimedTest(FPrintdVirtualDeviceBaseTest):
|
||||
self.device.VerifyStart('(s)', 'any')
|
||||
self.send_image(print)
|
||||
if should_match:
|
||||
self.assertVerifyMatch(selected_finger='any')
|
||||
self.assertVerifyMatch()
|
||||
else:
|
||||
self.assertVerifyNoMatch(selected_finger='any')
|
||||
self.assertVerifyNoMatch()
|
||||
self.device.VerifyStop()
|
||||
|
||||
self.device.Release()
|
||||
@ -3086,7 +3086,7 @@ class FPrindConcurrentPolkitRequestsTest(FPrintdVirtualStorageDeviceBaseTest):
|
||||
self.device.Claim('(s)', '')
|
||||
self.device.VerifyStart('(s)', 'any')
|
||||
self.send_image('whorl')
|
||||
self.assertVerifyMatch(selected_finger='any')
|
||||
self.assertVerifyMatch(selected_finger='left-thumb')
|
||||
self.device.VerifyStop()
|
||||
self.device.Release()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user