diff options
| author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-07-27 10:34:07 +0200 | 
|---|---|---|
| committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-01 13:54:57 +0200 | 
| commit | 1edde0fe0dfa5e06f38fbcf5a3969b2da9d065ea (patch) | |
| tree | c3df659ed4b020f989a9eaecd0c45a524bfed39d /unittest | |
| parent | 8c5b24092faf90672523e60e6eee12a83539ce11 (diff) | |
| download | libnitrokey-1edde0fe0dfa5e06f38fbcf5a3969b2da9d065ea.tar.gz libnitrokey-1edde0fe0dfa5e06f38fbcf5a3969b2da9d065ea.tar.bz2 | |
Add authentication for erasing slots
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest')
| -rw-r--r-- | unittest/test_bindings.py | 6 | 
1 files 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: | 
