diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-06 15:43:28 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-11 15:41:52 +0100 |
commit | 9e659919a4b2da8855a1c7ec83edb685e6fec663 (patch) | |
tree | 7a7703ced6dde12841a246027463c5aec5742b32 /unittest/test_pro.py | |
parent | f7101225f26176f62ef3df48bd20d43521210987 (diff) | |
download | libnitrokey-9e659919a4b2da8855a1c7ec83edb685e6fec663.tar.gz libnitrokey-9e659919a4b2da8855a1c7ec83edb685e6fec663.tar.bz2 |
Authenticate before factory reset so the command will not timeout
To investigate later
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/test_pro.py')
-rw-r--r-- | unittest/test_pro.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/unittest/test_pro.py b/unittest/test_pro.py index 0ad42e1..67fc585 100644 --- a/unittest/test_pro.py +++ b/unittest/test_pro.py @@ -147,6 +147,9 @@ def test_regenerate_aes_key(C): def test_enable_password_safe_after_factory_reset(C): assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK + if is_storage(C): + # for some reason storage likes to be authenticated before reset (to investigate) + assert C.NK_first_authenticate(DefaultPasswords.ADMIN, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK assert C.NK_factory_reset(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK wait(10) if is_storage(C): |