From 2811ae23a38d33b620fb7a07de8837c6d65c13e4 Mon Sep 17 00:00:00 2001 From: Joakim Uddholm Date: Sat, 23 Apr 2022 23:40:14 +0200 Subject: [PATCH] add some extra tests to ensure False is returned --- test_flask_session_captcha.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test_flask_session_captcha.py b/test_flask_session_captcha.py index edf5332..0e74412 100644 --- a/test_flask_session_captcha.py +++ b/test_flask_session_captcha.py @@ -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)