diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-02-23 10:08:55 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-02-23 15:42:39 +0100 |
commit | bca1d0c3e458b3a12fe0117d1c7bd50548bef777 (patch) | |
tree | fe91aa8841b878a03f7ba8298abcad57c6b4db29 /unittest/test_storage.py | |
parent | df36c4bf6b60903e458b86af89e2750dbcf263ff (diff) | |
download | libnitrokey-bca1d0c3e458b3a12fe0117d1c7bd50548bef777.tar.gz libnitrokey-bca1d0c3e458b3a12fe0117d1c7bd50548bef777.tar.bz2 |
Tests: make sure encrypted volume is enabled before unlocking hidden volume
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/test_storage.py')
-rw-r--r-- | unittest/test_storage.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/unittest/test_storage.py b/unittest/test_storage.py index 41c785f..096709d 100644 --- a/unittest/test_storage.py +++ b/unittest/test_storage.py @@ -246,6 +246,8 @@ def test_hidden_volume_corruption(C): hidden_volume_password = b'hiddenpassword' p = lambda i: hidden_volume_password + bb(str(i)) volumes_to_setup = 4 + assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK + assert C.NK_unlock_encrypted_volume(DefaultPasswords.USER) == DeviceErrorCode.STATUS_OK for i in range(volumes_to_setup): assert C.NK_create_hidden_volume(i, 20 + i * 10, 20 + i * 10 + i + 1, p(i)) == DeviceErrorCode.STATUS_OK assert C.NK_unlock_hidden_volume(p(i)) == DeviceErrorCode.STATUS_OK |