From 1edde0fe0dfa5e06f38fbcf5a3969b2da9d065ea Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 27 Jul 2016 10:34:07 +0200 Subject: Add authentication for erasing slots Signed-off-by: Szczepan Zalega --- unittest/test_bindings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unittest/test_bindings.py b/unittest/test_bindings.py index e94a6d6..da3bc83 100644 --- a/unittest/test_bindings.py +++ b/unittest/test_bindings.py @@ -183,8 +183,10 @@ def test_get_slot_names(C): def test_get_OTP_codes(C): C.NK_set_debug(True) - # assert C.NK_erase_hotp_slot(0, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK - # assert C.NK_erase_totp_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_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): code = C.NK_get_totp_code(i, 0, 0, 0) if code == 0: -- cgit v1.2.3