From 6eb06697e9dd26f4f37900251a7a6933b775a922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 8 Feb 2020 12:42:17 +0100 Subject: [PATCH] tests/virtual-image: Use introspection names for errors --- tests/virtual-image.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/virtual-image.py b/tests/virtual-image.py index 9abca0bf..2440c6dd 100755 --- a/tests/virtual-image.py +++ b/tests/virtual-image.py @@ -101,14 +101,12 @@ class VirtualImage(unittest.TestCase): del self.con self.dev.close_sync() - def send_retry(self, retry_error=1, iterate=True): - # The default (1) is too-short + def send_retry(self, retry_error=FPrint.DeviceRetry.TOO_SHORT, iterate=True): self.con.sendall(struct.pack('ii', -1, retry_error)) while iterate and ctx.pending(): ctx.iteration(False) - def send_error(self, device_error=0, iterate=True): - # The default (0) is a generic error + def send_error(self, device_error=FPrint.DeviceError.GENERAL, iterate=True): self.con.sendall(struct.pack('ii', -2, device_error)) while iterate and ctx.pending(): ctx.iteration(False)