mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
virtual-device: Return an duplicated data error if trying to re-enroll a print
This commit is contained in:
@@ -613,6 +613,13 @@ class VirtualDeviceStorage(VirtualDevice):
|
||||
self.assertFalse(self.dev.supports_capture())
|
||||
self.assertTrue(self.dev.has_storage())
|
||||
|
||||
def test_duplicate_enroll(self):
|
||||
self.enroll_print('testprint', FPrint.Finger.LEFT_LITTLE)
|
||||
with self.assertRaises(GLib.Error) as error:
|
||||
self.enroll_print('testprint', FPrint.Finger.LEFT_LITTLE)
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_DUPLICATE))
|
||||
|
||||
def test_list_empty(self):
|
||||
self.assertFalse(self.dev.list_prints_sync())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user