aboutsummaryrefslogtreecommitdiff
path: root/unittest/test_bindings.py
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-08-09 17:19:56 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-09 18:34:00 +0200
commitc4a2696ee556ca7ae98a893036eaf6d9d005492c (patch)
tree968ef4fe4d74a98d37345f4d4c28ad90ff239df2 /unittest/test_bindings.py
parent70518b294096ef51525853477378690f92584b73 (diff)
downloadlibnitrokey-c4a2696ee556ca7ae98a893036eaf6d9d005492c.tar.gz
libnitrokey-c4a2696ee556ca7ae98a893036eaf6d9d005492c.tar.bz2
Fixed test with getting random OTP codes
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/test_bindings.py')
-rw-r--r--unittest/test_bindings.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/unittest/test_bindings.py b/unittest/test_bindings.py
index 7b16a46..f94b859 100644
--- a/unittest/test_bindings.py
+++ b/unittest/test_bindings.py
@@ -397,6 +397,8 @@ def test_get_OTP_codes(C):
def test_get_OTP_code_from_not_programmed_slot(C):
assert C.NK_first_authenticate(DefaultPasswords.ADMIN, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK
+ assert C.NK_write_config(255, 255, 255, False, True, 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
@@ -463,7 +465,6 @@ def wait(t):
time.sleep(t)
-# @pytest.mark.skip()
def test_factory_reset(C):
C.NK_set_debug(True)
assert C.NK_first_authenticate(DefaultPasswords.ADMIN, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK
@@ -483,6 +484,7 @@ def test_factory_reset(C):
assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK
+@pytest.mark.skip(reason='Experimental')
def test_clear(C):
d = 'asdasdasd'
print(d)