File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class PwnedValidator:
1212 code = 'invalid'
1313 client = PwnedClient
1414
15- def __call__ (self , password ):
15+ def validate (self , password , user = None ):
1616 pwned_client = self .client ()
1717 count = pwned_client .count_occurrences (password )
1818 if count >= app_settings .PWNED ['OCCURRENCE_THRESHOLD' ]:
Original file line number Diff line number Diff line change 99def test_validator_found ():
1010 validator = PwnedValidator ()
1111 with pytest .raises (ValidationError ):
12- validator ('password' )
12+ validator . validate ('password' )
1313
1414
1515@pytest .mark .vcr
1616def test_validator_not_found ():
1717 validator = PwnedValidator ()
18- validator ('8CEF1E00B20F463C1E48B589B03660D4E3B9EF7A' )
18+ validator . validate ('8CEF1E00B20F463C1E48B589B03660D4E3B9EF7A' )
You can’t perform that action at this time.
0 commit comments