From de47911eea52421c3a8307e7d9a390a4c9f710b2 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Tue, 9 Aug 2016 18:05:17 +0200 Subject: Correction for TOTP RFC test: move authorization closer to command that needs it 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 f94b859..2ffa046 100644 --- a/unittest/test_bindings.py +++ b/unittest/test_bindings.py @@ -355,10 +355,10 @@ def test_TOTP_RFC_usepin(C, PIN_protection): """ # import time # time.sleep(2) - assert C.NK_first_authenticate(DefaultPasswords.ADMIN, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK if PIN_protection: C.NK_user_authenticate(DefaultPasswords.USER, DefaultPasswords.USER_TEMP) - assert C.NK_totp_set_time(t) == DeviceErrorCode.STATUS_OK # FIXME needs admin authentication + assert C.NK_first_authenticate(DefaultPasswords.ADMIN, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK + assert C.NK_totp_set_time(t) == DeviceErrorCode.STATUS_OK r = get_func(1, T, 0, 30) # FIXME T is not changing the outcome assert code == r -- cgit v1.2.3