device: Return 'enroll-failed' on cancelled enrollment

We were returning an 'enroll-unknown-error' while we actually know what
happened, so better to return a soft operation failure.
This commit is contained in:
Marco Trevisan (Treviño)
2020-02-10 17:22:50 +01:00
committed by Bastien Nocera
parent c12778ec5b
commit b312a5e540
2 changed files with 9 additions and 0 deletions

View File

@ -521,6 +521,13 @@ class FPrintdVirtualDeviceTest(FPrintdTest):
self.device.Release()
def test_enroll_stop_cancels(self):
self.device.Claim('(s)', 'testuser')
self.device.EnrollStart('(s)', 'left-index-finger')
self.device.EnrollStop()
self.wait_for_result(expected='enroll-failed')
if __name__ == '__main__':
if len(sys.argv) == 2 and sys.argv[1] == "list-tests":
for machine, human in list_tests():