Skip to content

Commit

Permalink
Tests: clear new SD card warning on factory reset
Browse files Browse the repository at this point in the history
Signed-off-by: Szczepan Zalega <[email protected]>
  • Loading branch information
szszszsz committed Dec 12, 2016
1 parent e414840 commit 925d750
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion unittest/test_pro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 925d750

Please sign in to comment.