summaryrefslogtreecommitdiff
path: root/unittest/test_bindings.py
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-09-08 16:05:11 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-09-08 16:48:36 +0200
commitbcbb54f49fad3f4bb3e8e6aca081d9d300e74d2b (patch)
treee11e0a7458d7aae9e484722550c60292b3a6d9ba /unittest/test_bindings.py
parent49de98994f234e93cc37e2f01d2927a05880a7e7 (diff)
downloadlibnitrokey-bcbb54f49fad3f4bb3e8e6aca081d9d300e74d2b.tar.gz
libnitrokey-bcbb54f49fad3f4bb3e8e6aca081d9d300e74d2b.tar.bz2
Function for getting device's serial number in hex. Fixes #33
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/test_bindings.py')
-rw-r--r--unittest/test_bindings.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/unittest/test_bindings.py b/unittest/test_bindings.py
index 2ffa046..eeda247 100644
--- a/unittest/test_bindings.py
+++ b/unittest/test_bindings.py
@@ -496,3 +496,10 @@ def test_get_status(C):
status = C.NK_status()
s = gs(status)
assert len(s) > 0
+
+
+def test_get_serial_number(C):
+ sn = C.NK_device_serial_number()
+ sn = gs(sn)
+ assert len(sn) > 0
+ print(('Serial number of the device: ', sn))