File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -23,4 +23,16 @@ def test_long_password():
2323 input_ = None
2424 password = "weopiopdsjmkldjvoisdjfioejiojweopiopdsjmkldjvoisdjfioejiojweopiopdsjmkldjvoisdjfioejiojweopiopdsjmkldjvoisdjfioejiojweopiopdsjmkldjvoisdjfioejiojweopiopdsjmkldjvoisdjfioejiojweopiopdsjmkldjvoisdjfioejiojweopiopdsjmkldjvoisdjfioejiojweopiopdsjmkldjvoisdjfioejiojweopiopdsjmkldjvoisdjfioejiojweopiopdsjmkldjvoisdjfioej"
2525
26- zxcvbn (password , user_inputs = [input_ ])
26+ zxcvbn (password , user_inputs = [input_ ])
27+
28+
29+ def test_dictionary_password ():
30+ # return the correct error message for a english match
31+ input_ = None
32+ password = "musculature"
33+
34+ result = zxcvbn (password , user_inputs = [input_ ])
35+
36+ assert result ["feedback" ]["warning" ] == \
37+ "A word by itself is easy to guess." , \
38+ "Gives specific error for single-word passwords"
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ def get_dictionary_match_feedback(match, is_sole_match):
103103 warning = _ ('This is a very common password.' )
104104 elif match ['guesses_log10' ] <= 4 :
105105 warning = _ ('This is similar to a commonly used password.' )
106- elif match ['dictionary_name' ] == 'english ' :
106+ elif match ['dictionary_name' ] == 'english_wikipedia ' :
107107 if is_sole_match :
108108 warning = _ ('A word by itself is easy to guess.' )
109109 elif match ['dictionary_name' ] in ['surnames' , 'male_names' ,
You can’t perform that action at this time.
0 commit comments