mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-09 04:13:33 +02:00
tests/fprintd-utils: Verify errors if the device is already claimed
This commit is contained in:
@ -178,6 +178,7 @@ class TestFprintdUtilsVerify(TestFprintdUtilsBase):
|
|||||||
self.process = self.start_utility_process('verify', args)
|
self.process = self.start_utility_process('verify', args)
|
||||||
out = self.get_process_output(self.process)
|
out = self.get_process_output(self.process)
|
||||||
|
|
||||||
|
self.assertNotRegex(out, r'Device already in use by [A-z]+')
|
||||||
self.assertNotIn('Verify result:', out)
|
self.assertNotIn('Verify result:', out)
|
||||||
|
|
||||||
if checkEnrolled:
|
if checkEnrolled:
|
||||||
@ -206,6 +207,12 @@ class TestFprintdUtilsVerify(TestFprintdUtilsBase):
|
|||||||
time.sleep(self.sleep_time * 4)
|
time.sleep(self.sleep_time * 4)
|
||||||
self.assertVerifyMatch(True)
|
self.assertVerifyMatch(True)
|
||||||
|
|
||||||
|
def test_fprintd_multiple_verify_fails(self):
|
||||||
|
self.start_verify_process()
|
||||||
|
|
||||||
|
with self.assertRaisesRegex(AssertionError, r'Device already in use'):
|
||||||
|
self.start_verify_process()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# avoid writing to stderr
|
# avoid writing to stderr
|
||||||
unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
|
unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
|
||||||
|
|||||||
Reference in New Issue
Block a user