Commit 3999a76e authored by Michal Čihař's avatar Michal Čihař

Test generating of all captcha operations

parent c91daeab
......@@ -587,6 +587,15 @@ class CaptchaTest(UnitTestCase):
captcha.hashed[:40]
)
def test_generate(self):
'''
Test generating of captcha for every operator.
'''
captcha = MathCaptcha()
for operator in MathCaptcha.operators:
captcha.operators = (operator,)
self.assertIn(operator, captcha.generate_question())
class MiddlewareTest(TestCase):
def view_method(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment