Skip to content

Commit 8459ce5

Browse files
musicsnobjdwolfhub
authored andcommitted
add failing test for empty password scenario
1 parent 2b3e11f commit 8459ce5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/zxcvbn_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,12 @@ def test_dictionary_password():
3737
assert result["feedback"]["warning"] == \
3838
"A word by itself is easy to guess.", \
3939
"Gives specific error for single-word passwords"
40+
41+
def test_empty_password():
42+
input_ = None
43+
password = ""
44+
45+
try:
46+
zxcvbn(password, user_inputs=[input_])
47+
except IndexError as ie:
48+
assert False, "Empty password raised IndexError"

0 commit comments

Comments
 (0)