aboutsummaryrefslogtreecommitdiff
path: root/unittest/test_library.py
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2019-06-13 14:21:06 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2019-06-13 15:00:59 +0200
commit0deddc2205b164cb775ff908265eebdf80943df2 (patch)
tree5ff1ead7ddc4644d8d27cbea623a64ab1ed8a91b /unittest/test_library.py
parentae95a590a652cd17c82dbef4098ac496485c7cbd (diff)
downloadlibnitrokey-0deddc2205b164cb775ff908265eebdf80943df2.tar.gz
libnitrokey-0deddc2205b164cb775ff908265eebdf80943df2.tar.bz2
Add test for firmware password length
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/test_library.py')
-rw-r--r--unittest/test_library.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/unittest/test_library.py b/unittest/test_library.py
index f6cf366..f26e587 100644
--- a/unittest/test_library.py
+++ b/unittest/test_library.py
@@ -41,6 +41,8 @@ def test_too_long_strings(C):
long_string) == LibraryErrors.TOO_LONG_STRING
assert gs(C.NK_get_hotp_code_PIN(0, long_string)) == b""
assert C.NK_get_last_command_status() == LibraryErrors.TOO_LONG_STRING
+ assert C.NK_change_firmware_password_pro(long_string, long_string) == LibraryErrors.TOO_LONG_STRING
+ assert C.NK_change_firmware_password_pro(DefaultPasswords.UPDATE, long_string) == LibraryErrors.TOO_LONG_STRING
def test_invalid_slot(C):