Skip to content
GitLab
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
f8c2d58a
Verified
Commit
f8c2d58a
authored
Oct 03, 2018
by
Sébastiaan Versteeg
Browse files
Fix registrations tests
parent
937a5b1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/registrations/models.py
View file @
f8c2d58a
...
...
@@ -265,7 +265,7 @@ class Registration(Entry):
'Login using the existing account and renew the '
'membership by visiting the account settings.'
)})
elif
(
self
.
student_number
is
None
and
self
.
membership_type
!=
Membership
.
SUPPORTE
R
):
self
.
membership_type
!=
Membership
.
BENEFACTO
R
):
errors
.
update
({
'student_number'
:
_
(
'This field is required.'
)})
...
...
website/registrations/tests/test_models.py
View file @
f8c2d58a
...
...
@@ -155,7 +155,7 @@ class RegistrationTest(TestCase):
with
self
.
subTest
(
'Type is benefactor'
):
self
.
registration
.
student_number
=
None
self
.
registration
.
membership_type
=
Membership
.
SUPPORTE
R
self
.
registration
.
membership_type
=
Membership
.
BENEFACTO
R
self
.
registration
.
clean
()
def
test_unique_username_user
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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