mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
tests: Skip hotplug test if "removed" property does not exist
The test requires libfprint 1.90.4 to work, otherwise it will just hang forever.
This commit is contained in:
@ -138,6 +138,8 @@ class FPrintdTest(dbusmock.DBusTestCase):
|
||||
fprintd = None
|
||||
cls._polkitd = None
|
||||
|
||||
cls._has_hotplug = FPrint.Device.find_property("removed") is not None
|
||||
|
||||
if 'FPRINT_BUILD_DIR' in os.environ:
|
||||
print('Testing local build')
|
||||
build_dir = os.environ['FPRINT_BUILD_DIR']
|
||||
@ -688,6 +690,9 @@ class FPrintdVirtualDeviceTest(FPrintdVirtualDeviceBaseTest):
|
||||
time.sleep(1)
|
||||
|
||||
def test_removal_during_enroll(self):
|
||||
if not self._has_hotplug:
|
||||
self.skipTest("libfprint is too old for hotplug")
|
||||
|
||||
self._polkitd_obj.SetAllowed(['net.reactivated.fprint.device.setusername',
|
||||
'net.reactivated.fprint.device.enroll'])
|
||||
self.device.Claim('(s)', 'testuser')
|
||||
|
||||
Reference in New Issue
Block a user