Exemplo n.º 1
0
 def test_registration_form_with_honeypot_field(self):
     data = {
         'email': '[email protected]',
         'password1': 'Pa$sw0rd',
         'password2': 'Pa$sw0rd',
     }
     form = RegistrationFormHoneypot(data=data)
     self.assertTrue(form.is_valid())
Exemplo n.º 2
0
 def test_registration_form_with_honeypot_field_fails_as_expected(self):
     data = {
         'email': '[email protected]',
         'password1': 'Pa$sw0rd',
         'password2': 'Pa$sw0rd',
         'accept_terms': True
     }
     form = RegistrationFormHoneypot(data=data)
     self.assertFalse(form.is_valid())