From 470750a93c181e01a761dd15f718a3256e4ce3be Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Thu, 28 Jul 2016 14:37:53 +0200 Subject: Use proper number of HOTP slots in test - 15 Signed-off-by: Szczepan Zalega --- unittest/test_bindings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unittest/test_bindings.py b/unittest/test_bindings.py index 5fb7e83..19db964 100644 --- a/unittest/test_bindings.py +++ b/unittest/test_bindings.py @@ -217,7 +217,7 @@ def test_get_slot_names(C): assert C.NK_first_authenticate(DefaultPasswords.ADMIN, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK assert C.NK_erase_hotp_slot(0, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK - for i in range(16): + for i in range(15): name = ffi.string(C.NK_get_totp_slot_name(i)) if name == '': assert C.NK_get_last_command_status() == DeviceErrorCode.NOT_PROGRAMMED @@ -233,7 +233,7 @@ def test_get_OTP_codes(C): assert C.NK_erase_hotp_slot(0, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK assert C.NK_first_authenticate(DefaultPasswords.ADMIN, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK assert C.NK_erase_totp_slot(0, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK - for i in range(16): + for i in range(15): code = C.NK_get_totp_code(i, 0, 0, 0) if code == 0: assert C.NK_get_last_command_status() == DeviceErrorCode.NOT_PROGRAMMED -- cgit v1.2.3