summaryrefslogtreecommitdiff
path: root/test/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.py')
-rwxr-xr-xtest/test.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test.py b/test/test.py
index 947e625..4b89a43 100755
--- a/test/test.py
+++ b/test/test.py
@@ -100,6 +100,15 @@ class TestBcrypt(unittest.TestCase):
crypted2 = bcrypt.hashpw(plain, crypted)
self.assertEqual(crypted, crypted2)
+ def test_02__checkpw_success(self):
+ for plain, salt, expected in test_vectors:
+ self.assertTrue(bcrypt.checkpw(plain, expected))
+
+ def test_03__checkpw_fail(self):
+ for plain, salt, expected in test_vectors:
+ self.assertFalse(bcrypt.checkpw("foo", expected))
+
+
# rounds, password, salt, expected_key
kdf_test_vectors = [
[ 4, "password", "salt",