diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-07-28 14:37:53 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-01 13:54:58 +0200 |
commit | 470750a93c181e01a761dd15f718a3256e4ce3be (patch) | |
tree | 29eb6466ef72f46d4ec3a0768bd7c76f5f27e95c | |
parent | debee8aa477fbec7c1c23d5dec565de11241f814 (diff) | |
download | libnitrokey-470750a93c181e01a761dd15f718a3256e4ce3be.tar.gz libnitrokey-470750a93c181e01a761dd15f718a3256e4ce3be.tar.bz2 |
Use proper number of HOTP slots in test - 15
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r-- | unittest/test_bindings.py | 4 |
1 files 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 |