Unverified Commit e8c1a5f3 authored by Joost Rijneveld's avatar Joost Rijneveld
Browse files

Add test case for committees without any address

This completes the XOR check; either a verbatim address or a list
parent 08bccd98
......@@ -185,12 +185,17 @@ class CommitteeMailingListTest(TestCase):
self.testcie2.full_clean()
def test_no_emailaddress(self):
def test_exactly_one_address(self):
with self.assertRaises(ValidationError):
self.testcie1.contact_mailinglist = self.mailtest1
self.testcie1.contact_email = "test@test.com"
self.testcie1.full_clean()
with self.assertRaises(ValidationError):
self.testcie1.contact_mailinglist = None
self.testcie1.contact_email = None
self.testcie1.full_clean()
self.testcie1.contact_mailinglist = self.mailtest1
self.testcie1.contact_email = None
self.testcie1.full_clean()
......
Supports Markdown
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