mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
device: Delete existing print in EnrollStart
gnome-control-center expects to be able to re-enroll an existing print when calling EnrollStart without deleting it first. As such, implicitly delete the existing print rather than throwing an error. Ideally, we'll change the API, but we need to give API users time to adjust to the world.
This commit is contained in:
@ -2315,9 +2315,21 @@ class FPrintdVirtualDeviceEnrollTests(FPrintdVirtualDeviceBaseTest):
|
||||
def test_enroll_already_enrolled_finger(self):
|
||||
self.enroll_image('whorl', start=False)
|
||||
|
||||
# We can enroll a new image deleting the first
|
||||
self.device.EnrollStart('(s)', 'left-middle-finger')
|
||||
self.enroll_image('arch', start=False)
|
||||
self.stop_on_teardown = False
|
||||
with self.assertFprintError('FingerAlreadyEnrolled'):
|
||||
self.device.EnrollStart('(s)', 'left-middle-finger')
|
||||
|
||||
# If we verify, 'arch' will match, 'whorl' will not match
|
||||
self.device.VerifyStart('(s)', 'any')
|
||||
self.send_image('whorl')
|
||||
self.assertVerifyNoMatch()
|
||||
self.device.VerifyStop()
|
||||
|
||||
self.device.VerifyStart('(s)', 'any')
|
||||
self.send_image('arch')
|
||||
self.assertVerifyMatch()
|
||||
self.device.VerifyStop()
|
||||
|
||||
def test_enroll_duplicate_image(self):
|
||||
self.enroll_image('whorl', finger='left-thumb', start=False)
|
||||
|
||||
Reference in New Issue
Block a user