diff options
| author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-09 18:05:17 +0200 | 
|---|---|---|
| committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-09 18:35:03 +0200 | 
| commit | de47911eea52421c3a8307e7d9a390a4c9f710b2 (patch) | |
| tree | 883d8abb992b2884b808d48152c132ea7b6c667b /unittest | |
| parent | c4a2696ee556ca7ae98a893036eaf6d9d005492c (diff) | |
| download | libnitrokey-de47911eea52421c3a8307e7d9a390a4c9f710b2.tar.gz libnitrokey-de47911eea52421c3a8307e7d9a390a4c9f710b2.tar.bz2 | |
Correction for TOTP RFC test: move authorization closer to command that
needs it
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest')
| -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 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 | 
