summaryrefslogtreecommitdiff
path: root/unittest/test_storage.py
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-11-03 18:22:02 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2016-11-26 18:56:29 +0100
commitcdd16f3f184b2745094da39de3f815aea6633fdb (patch)
treead2a4513b1ad01b225a519ac10cafa3e583a26a1 /unittest/test_storage.py
parent8d4bff3590191e369be02bbe0fbf858ab8930f52 (diff)
downloadlibnitrokey-cdd16f3f184b2745094da39de3f815aea6633fdb.tar.gz
libnitrokey-cdd16f3f184b2745094da39de3f815aea6633fdb.tar.bz2
Rename methods in API to make string return more obvious
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/test_storage.py')
-rw-r--r--unittest/test_storage.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/unittest/test_storage.py b/unittest/test_storage.py
index e7e0bda..01276ce 100644
--- a/unittest/test_storage.py
+++ b/unittest/test_storage.py
@@ -22,15 +22,18 @@ def get_dict_from_dissect(status):
def test_get_status_storage(C):
- status_pointer = C.NK_get_status_storage()
+ status_pointer = C.NK_get_status_storage_as_string()
+ assert C.NK_get_last_command_status() == DeviceErrorCode.STATUS_OK
status_string = gs(status_pointer)
+ assert len(status_string) > 0
status_dict = get_dict_from_dissect(status_string)
default_admin_password_retry_count = 3
assert int(status_dict['AdminPwRetryCount']) == default_admin_password_retry_count
def test_sd_card_usage(C):
- data_pointer = C.NK_get_SD_usage_data()
+ data_pointer = C.NK_get_SD_usage_data_as_string()
+ assert C.NK_get_last_command_status() == DeviceErrorCode.STATUS_OK
data_string = gs(data_pointer)
assert len(data_string) > 0
data_dict = get_dict_from_dissect(data_string)