Example #1
0
 def test_valid_form(self):
     form_data = {'name': 'something',
                  'email': '*****@*****.**',
                  'message': 'text',
                  'captcha_0': 'dummy-value',
                  'captcha_1': 'PASSED'}
     form = ContactForm(data=form_data)
     self.assertTrue(form.is_valid())
Example #2
0
 def test_invalid_form(self):
     form_data = {'name': 'something', 'email': 'blublue', 'message': 'text'}
     form = ContactForm(data=form_data)
     self.assertFalse(form.is_valid())