From 0203c8aed847d7834fadb516671387894241468f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sun, 6 Dec 2020 20:07:06 +0100 Subject: [PATCH] tests: Add more tests to verify AlreadyInUse error on deletion methods --- tests/fprintd.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/fprintd.py b/tests/fprintd.py index 8bdd180..5ed17c2 100755 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -1476,6 +1476,14 @@ class FPrintdVirtualDeviceClaimedTest(FPrintdVirtualDeviceBaseTest): with self.assertFprintError('AlreadyInUse'): self.call_device_method_from_other_client('DeleteEnrolledFingers', ['testuser']) + def test_delete_enrolled_fingers2_from_other_client(self): + with self.assertFprintError('AlreadyInUse'): + self.call_device_method_from_other_client('DeleteEnrolledFingers2') + + def test_delete_enrolled_finger_from_other_client(self): + with self.assertFprintError('AlreadyInUse'): + self.call_device_method_from_other_client('DeleteEnrolledFinger', ['left-index-finger']) + def test_release_from_other_client(self): with self.assertFprintError('AlreadyInUse'): self.call_device_method_from_other_client('Release') @@ -1657,6 +1665,18 @@ class FPrintdVirtualDeviceEnrollTests(FPrintdVirtualDeviceBaseTest): with self.assertFprintError('AlreadyInUse'): self.call_device_method_from_other_client('EnrollStop') + def test_delete_fingers_during_enroll(self): + with self.assertFprintError('AlreadyInUse'): + self.device.DeleteEnrolledFingers('(s)', '') + + def test_delete_fingers2_during_enroll(self): + with self.assertFprintError('AlreadyInUse'): + self.device.DeleteEnrolledFingers2() + + def test_delete_finger_during_enroll(self): + with self.assertFprintError('AlreadyInUse'): + self.device.DeleteEnrolledFinger('(s)', 'left-thumb') + class FPrintdVirtualDeviceVerificationTests(FPrintdVirtualDeviceBaseTest): @@ -1782,6 +1802,18 @@ class FPrintdVirtualDeviceVerificationTests(FPrintdVirtualDeviceBaseTest): with self.assertFprintError('AlreadyInUse'): self.call_device_method_from_other_client('VerifyStop') + def test_delete_fingers_during_verify(self): + with self.assertFprintError('AlreadyInUse'): + self.device.DeleteEnrolledFingers('(s)', '') + + def test_delete_fingers2_during_verify(self): + with self.assertFprintError('AlreadyInUse'): + self.device.DeleteEnrolledFingers2() + + def test_delete_finger_during_verify(self): + with self.assertFprintError('AlreadyInUse'): + self.device.DeleteEnrolledFinger('(s)', 'left-thumb') + class FPrintdVirtualDeviceIdentificationTests(FPrintdVirtualDeviceVerificationTests): '''This class will just repeat the tests of FPrintdVirtualDeviceVerificationTests