summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2018-02-23 12:51:49 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2018-02-23 15:42:39 +0100
commitdf36c4bf6b60903e458b86af89e2750dbcf263ff (patch)
tree965e01d931624b2cf4271bf7e9f0dba960d89260
parent4e6d39e9aae54658eb68a739d9eff55ab797c204 (diff)
downloadlibnitrokey-df36c4bf6b60903e458b86af89e2750dbcf263ff.tar.gz
libnitrokey-df36c4bf6b60903e458b86af89e2750dbcf263ff.tar.bz2
Tests: rename _admin related and skip not supported encrypted volume ro/rw tests
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--unittest/test_storage.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/unittest/test_storage.py b/unittest/test_storage.py
index 9897727..41c785f 100644
--- a/unittest/test_storage.py
+++ b/unittest/test_storage.py
@@ -276,29 +276,31 @@ def test_unencrypted_volume_set_read_write(C):
@pytest.mark.unencrypted
-def test_unencrypted_volume_set_read_only(C):
- skip_if_device_version_lower_than({'S': 49})
+def test_unencrypted_volume_set_read_only_admin(C):
+ skip_if_device_version_lower_than({'S': 51})
assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK
- assert C.NK_set_unencrypted_read_only(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK
+ assert C.NK_set_unencrypted_read_only_admin(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK
@pytest.mark.unencrypted
-def test_unencrypted_volume_set_read_write(C):
- skip_if_device_version_lower_than({'S': 49})
+def test_unencrypted_volume_set_read_write_admin(C):
+ skip_if_device_version_lower_than({'S': 51})
assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK
- assert C.NK_set_unencrypted_read_write(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK
+ assert C.NK_set_unencrypted_read_write_admin(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK
@pytest.mark.encrypted
+@pytest.mark.skip(reason='not supported on recent firmware, except v0.49')
def test_encrypted_volume_set_read_only(C):
- skip_if_device_version_lower_than({'S': 49})
+ skip_if_device_version_lower_than({'S': 99})
assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK
assert C.NK_set_encrypted_read_only(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK
@pytest.mark.encrypted
+@pytest.mark.skip(reason='not supported on recent firmware, except v0.49')
def test_encrypted_volume_set_read_write(C):
- skip_if_device_version_lower_than({'S': 49})
+ skip_if_device_version_lower_than({'S': 99})
assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK
assert C.NK_set_encrypted_read_write(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK