summaryrefslogtreecommitdiff
path: root/tests/test_bcrypt.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2022-09-16 10:22:40 -0400
committerGitHub <noreply@github.com>2022-09-16 09:22:40 -0500
commite1ed0f46caf49be26a43628375d0b09ca79a7b97 (patch)
tree297b8690bb0ceb4fb5e31adaf03abc440a6522b3 /tests/test_bcrypt.py
parentcd4229d64c33627db84866499a9b8daf6ffdd19f (diff)
downloadpy-bcrypt-git-e1ed0f46caf49be26a43628375d0b09ca79a7b97.tar.gz
fixes #416 -- correctly handle invalid salts (#417)
Diffstat (limited to 'tests/test_bcrypt.py')
-rw-r--r--tests/test_bcrypt.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_bcrypt.py b/tests/test_bcrypt.py
index c6deb85..f0df6bf 100644
--- a/tests/test_bcrypt.py
+++ b/tests/test_bcrypt.py
@@ -272,6 +272,11 @@ def test_checkpw_bad_salt():
b"badpass",
b"$2b$04$?Siw3Nv3Q/gTOIPetAyPr.GNj3aO0lb1E5E9UumYGKjP9BYqlNWJe",
)
+ with pytest.raises(ValueError):
+ bcrypt.checkpw(
+ b"password",
+ b"$2b$3$mdEQPMOtfPX.WGZNXgF66OhmBlOGKEd66SQ7DyJPGucYYmvTJYviy",
+ )
def test_checkpw_str_password():