Commit 8f35394b authored by Marco Trevisan's avatar Marco Trevisan
Browse files

tests/fprintd: Ensure that we get an error on early release

Ensure that we get an error when releasing a device that is in process of
enrollment, verification or identification
parent 4620c89c
......@@ -538,6 +538,29 @@ class FPrintdVirtualDeviceTest(FPrintdTest):
self.device.VerifyStart('(s)', 'left-thumb')
self.device.VerifyStop()
def test_busy_device_release_on_enroll(self):
self.device.Claim('(s)', 'testuser')
self.device.EnrollStart('(s)', 'left-index-finger')
self.device.Release()
self.wait_for_result(expected='enroll-failed')
def test_busy_device_release_on_verify(self):
self.device.Claim('(s)', 'testuser')
self.enroll_image('whorl', finger='left-index-finger')
self.device.VerifyStart('(s)', 'any')
self.device.Release()
self.wait_for_result(expected='verify-no-match')
def test_busy_device_release_on_verify_finger(self):
self.device.Claim('(s)', 'testuser')
self.enroll_image('whorl', finger='left-middle-finger')
self.device.VerifyStart('(s)', 'left-middle-finger')
self.device.Release()
self.wait_for_result(expected='verify-no-match')
if __name__ == '__main__':
if len(sys.argv) == 2 and sys.argv[1] == "list-tests":
......
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