mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
tests: Add test that enforces a verify/identify operation restart
In the usual test we cancel the operation immediately by calling VerifyStop. This (often) tests the case where we don't end up restarting the Verify operation internally. We can easily force fprintd to have restarted already internally, so add a test that does so by sleeping a bit. This should give us a slightly higher branch coverage in the verify_cb/identify_cb tests.
This commit is contained in:
@ -1214,6 +1214,12 @@ class FPrintdVirtualDeviceVerificationTests(FPrintdVirtualDeviceBaseTest):
|
||||
def test_verify_retry_general(self):
|
||||
self.assertVerifyRetry(FPrint.DeviceRetry.GENERAL, 'verify-retry-scan')
|
||||
|
||||
def test_verify_retry_general_restarted(self):
|
||||
self.assertVerifyRetry(FPrint.DeviceRetry.GENERAL, 'verify-retry-scan')
|
||||
# Give fprintd time to re-start the request. We can't force the other
|
||||
# case (cancellation before restart happened), but we can force this one.
|
||||
time.sleep(1)
|
||||
|
||||
def test_verify_retry_too_short(self):
|
||||
self.assertVerifyRetry(FPrint.DeviceRetry.TOO_SHORT, 'verify-swipe-too-short')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user