Ejemplo n.º 1
0
 def test_clean_invite_attendees__invalid(self):
     expected = ['*****@*****.**', 'test@democom']
     data = ','.join(expected)
     org = OrganizationFactory()
     form = EventRegistrationForm(None, org)
     form.cleaned_data = {'invite_attendees': data}
     with self.assertRaises(ValidationError):
         form.clean_invite_attendees()
Ejemplo n.º 2
0
 def test_clean_invite_attendees__invalid(self):
     expected = ['*****@*****.**', 'test@democom']
     data = ','.join(expected)
     org = OrganizationFactory()
     form = EventRegistrationForm(None, org)
     form.cleaned_data = {'invite_attendees': data}
     with self.assertRaises(ValidationError):
         form.clean_invite_attendees()
Ejemplo n.º 3
0
 def test_clean_invite_attendees__strip_whitespace(self):
     expected = ['*****@*****.**', '*****@*****.**']
     data = ', '.join(expected)
     org = OrganizationFactory()
     form = EventRegistrationForm(None, org)
     form.cleaned_data = {'invite_attendees': data}
     cleaned = form.clean_invite_attendees()
     self.assertEqual(cleaned, expected)
Ejemplo n.º 4
0
 def test_clean_invite_attendees__strip_whitespace(self):
     expected = ['*****@*****.**', '*****@*****.**']
     data = ', '.join(expected)
     org = OrganizationFactory()
     form = EventRegistrationForm(None, org)
     form.cleaned_data = {'invite_attendees': data}
     cleaned = form.clean_invite_attendees()
     self.assertEqual(cleaned, expected)