tests/fprintd-utils: Check that verify returns an error if no finger is set

This commit is contained in:
Marco Trevisan (Treviño)
2020-04-03 02:12:41 +02:00
parent 5635383c96
commit 94d3a18dcd
2 changed files with 5 additions and 5 deletions

View File

@ -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(

View File

@ -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 )