From 756dd5f132ffe75b727e32df8648b95672e5493a Mon Sep 17 00:00:00 2001 From: Ricardo Martincoski Date: Fri, 16 Nov 2018 01:57:28 -0200 Subject: support/testing: add python-passlib tests Add a simple test case that creates a hash for a password and verifies it against an incorrect and a correct password. Signed-off-by: Ricardo Martincoski Signed-off-by: Thomas Petazzoni --- support/testing/tests/package/sample_python_passlib.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 support/testing/tests/package/sample_python_passlib.py (limited to 'support/testing/tests/package/sample_python_passlib.py') diff --git a/support/testing/tests/package/sample_python_passlib.py b/support/testing/tests/package/sample_python_passlib.py new file mode 100644 index 0000000000..3ab348b9e4 --- /dev/null +++ b/support/testing/tests/package/sample_python_passlib.py @@ -0,0 +1,5 @@ +from passlib.hash import pbkdf2_sha256 + +hash = pbkdf2_sha256.hash("password") +assert(pbkdf2_sha256.verify("passWord", hash) is False) +assert(pbkdf2_sha256.verify("password", hash) is True) -- cgit v1.2.3