Skip to content

Commit

Permalink
add some extra tests to ensure False is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
Tethik committed Apr 23, 2022
1 parent 50b4053 commit 2811ae2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test_flask_session_captcha.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ def test_captcha_validate_value(self):
with self.app.test_request_context('/'):
captcha.generate()
answer = captcha.get_answer()
assert not captcha.validate(value="wrong")
assert captcha.validate(value=None) == False
captcha.generate()
answer = captcha.get_answer()
assert captcha.validate(value="") == False
captcha.generate()
answer = captcha.get_answer()
assert captcha.validate(value="wrong") == False
captcha.generate()
answer = captcha.get_answer()
assert captcha.validate(value=answer)
Expand Down

0 comments on commit 2811ae2

Please # to comment.