Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
e8c1a5f3
Unverified
Commit
e8c1a5f3
authored
Aug 25, 2017
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/activemembers/tests.py
View file @
e8c1a5f3
...
...
@@ -185,12 +185,17 @@ class CommitteeMailingListTest(TestCase):
self
.
testcie2
.
full_clean
()
def
test_
no_email
address
(
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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment