Beispiel #1
0
 def test_validation_fails_on_different_passwords(self):
     invitee = {'username': '******', 'password1': 'password', 'password2': 'diffpassword'}
     form = AcceptInvitationForm(invitee)
     self.assertFalse(form.is_valid())
     
     
     
     
     
     
     
Beispiel #2
0
 def test_username_already_exists(self):
     user = G(User, username='******')
     form = AcceptInvitationForm(self.data)
     self.assertFalse(form.is_valid())
Beispiel #3
0
 def test_form_validation(self):
     invite_accepted_form = AcceptInvitationForm(self.data)
     self.assertTrue(invite_accepted_form.is_valid())