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
3ca29495
Commit
3ca29495
authored
Oct 03, 2018
by
Luko van der Maas
Browse files
Merge branch 'fix/registration-tests' into 'master'
Fix registrations tests See merge request
!968
parents
937a5b1d
f8c2d58a
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/registrations/models.py
View file @
3ca29495
...
@@ -265,7 +265,7 @@ class Registration(Entry):
...
@@ -265,7 +265,7 @@ class Registration(Entry):
'Login using the existing account and renew the '
'Login using the existing account and renew the '
'membership by visiting the account settings.'
)})
'membership by visiting the account settings.'
)})
elif
(
self
.
student_number
is
None
and
elif
(
self
.
student_number
is
None
and
self
.
membership_type
!=
Membership
.
SUPPORTE
R
):
self
.
membership_type
!=
Membership
.
BENEFACTO
R
):
errors
.
update
({
errors
.
update
({
'student_number'
:
_
(
'This field is required.'
)})
'student_number'
:
_
(
'This field is required.'
)})
...
...
website/registrations/tests/test_models.py
View file @
3ca29495
...
@@ -155,7 +155,7 @@ class RegistrationTest(TestCase):
...
@@ -155,7 +155,7 @@ class RegistrationTest(TestCase):
with
self
.
subTest
(
'Type is benefactor'
):
with
self
.
subTest
(
'Type is benefactor'
):
self
.
registration
.
student_number
=
None
self
.
registration
.
student_number
=
None
self
.
registration
.
membership_type
=
Membership
.
SUPPORTE
R
self
.
registration
.
membership_type
=
Membership
.
BENEFACTO
R
self
.
registration
.
clean
()
self
.
registration
.
clean
()
def
test_unique_username_user
(
self
):
def
test_unique_username_user
(
self
):
...
...
Write
Preview
Markdown
is supported
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