diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-12-09 11:12:24 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-12-09 14:06:49 +0100 |
commit | 7c432494269144fa9777266834fd5b88b4fe1b90 (patch) | |
tree | ba426f96848fb26a0b041254748ba7a8338ee893 /unittest | |
parent | 8e1499871dda0559b0d7164e23d9e146f10409ec (diff) | |
download | libnitrokey-7c432494269144fa9777266834fd5b88b4fe1b90.tar.gz libnitrokey-7c432494269144fa9777266834fd5b88b4fe1b90.tar.bz2 |
Add NK Storage specific reply on running not initialized Password Safe
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/test_pro.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unittest/test_pro.py b/unittest/test_pro.py index 7f567c7..6b47c9f 100644 --- a/unittest/test_pro.py +++ b/unittest/test_pro.py @@ -81,7 +81,9 @@ def test_enable_password_safe_after_factory_reset(C): assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK assert C.NK_factory_reset(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK wait(10) - assert C.NK_enable_password_safe(DefaultPasswords.USER) == DeviceErrorCode.STATUS_AES_DEC_FAILED + enable_password_safe_result = C.NK_enable_password_safe(DefaultPasswords.USER) + assert enable_password_safe_result == DeviceErrorCode.STATUS_AES_DEC_FAILED \ + or is_storage(C) and enable_password_safe_result == DeviceErrorCode.WRONG_PASSWORD assert C.NK_build_aes_key(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK assert C.NK_enable_password_safe(DefaultPasswords.USER) == DeviceErrorCode.STATUS_OK |