Commit 657b90a0 authored by Marco Trevisan's avatar Marco Trevisan Committed by Bastien Nocera
Browse files

tests/fprintd: Move assertFprintError to FPrintdTest

This may be used by any class inheriting FPrintdTest, so let's move it at
lower level.
parent 3821b96c
......@@ -264,6 +264,10 @@ class FPrintdTest(dbusmock.DBusTestCase):
self.run_dir = os.path.join(self.test_dir, 'run')
os.environ['FP_DRIVERS_WHITELIST'] = 'virtual_image'
def assertFprintError(self, fprint_error):
return self.assertRaisesRegex(GLib.Error,
'.*net\.reactivated\.Fprint\.Error\.{}.*'.format(fprint_error))
# From libfprint tests
def send_retry(self, retry_error=FPrint.DeviceRetry.TOO_SHORT):
with Connection(self.sockaddr) as con:
......@@ -338,10 +342,6 @@ class FPrintdVirtualDeviceBaseTest(FPrintdTest):
super().tearDown()
def assertFprintError(self, fprint_error):
return self.assertRaisesRegex(GLib.Error,
'.*net\.reactivated\.Fprint\.Error\.{}.*'.format(fprint_error))
def wait_for_result(self, expected=None):
self._abort = False
while not self._abort:
......
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