mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
tests/fprintd-utils: Check that verify returns an error if no finger is set
This commit is contained in:
@ -322,11 +322,6 @@ def SetEnrolledFingers(device, user, fingers):
|
||||
Returns nothing.
|
||||
'''
|
||||
|
||||
if len(fingers) < 1:
|
||||
raise dbus.exceptions.DBusException(
|
||||
'Fingers array must not be empty',
|
||||
name='org.freedesktop.DBus.Error.InvalidArgs')
|
||||
|
||||
for k in fingers:
|
||||
if k not in VALID_FINGER_NAMES:
|
||||
raise dbus.exceptions.DBusException(
|
||||
|
||||
@ -234,6 +234,11 @@ class TestFprintdUtilsVerify(TestFprintdUtilsBase):
|
||||
self.start_verify_process(finger=finger)
|
||||
self.device_mock.Release()
|
||||
|
||||
def test_fprintd_verify_no_enrolled_fingers(self):
|
||||
self.set_enrolled_fingers([])
|
||||
self.start_verify_process()
|
||||
self.assertEqual(self.process.poll(), 1)
|
||||
|
||||
def test_fprintd_verify_script(self):
|
||||
script = [
|
||||
( 'verify-match', True, 2 )
|
||||
|
||||
Reference in New Issue
Block a user