mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +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:
committed by
Bastien Nocera
parent
3821b96ca5
commit
657b90a066
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user