diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-12-12 15:10:09 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-12-12 15:10:09 +0100 |
commit | 925d75007161aa845e8c29ac412ac875cf45f337 (patch) | |
tree | 8932d42052b96a523edb221b8a2eb6159ca6c66e /unittest/test_pro.py | |
parent | e414840ab19ce022d5354fad13bcbcbe41925eea (diff) | |
download | libnitrokey-925d75007161aa845e8c29ac412ac875cf45f337.tar.gz libnitrokey-925d75007161aa845e8c29ac412ac875cf45f337.tar.bz2 |
Tests: clear new SD card warning on factory reset
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/test_pro.py')
-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 2a4a1a7..a6f7094 100644 --- a/unittest/test_pro.py +++ b/unittest/test_pro.py @@ -84,6 +84,8 @@ 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) + if is_storage(C): + assert C.NK_clear_new_sd_card_warning(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK 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 @@ -496,7 +498,7 @@ def test_factory_reset(C): assert C.NK_enable_password_safe(DefaultPasswords.USER) == DeviceErrorCode.STATUS_OK assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK if is_storage(C): - C.NK_clear_new_sd_card_warning(DefaultPasswords.ADMIN) + assert C.NK_clear_new_sd_card_warning(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK def test_get_status(C): |