mirror of
https://gitlab.freedesktop.org/libfprint/fprintd.git
synced 2026-05-05 01:47:58 +02:00
tests/fprintd: Move assertFprintError to FPrintdTest
This may be used by any class inheriting FPrintdTest, so let's move it at lower level.
This commit is contained in:
parent
3821b96ca5
commit
657b90a066
1 changed files with 4 additions and 4 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue