mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 09:58:23 +02:00
add VSS checkbox on registration
This commit is contained in:
@ -48,6 +48,7 @@ class TestSignup(TestCase):
|
||||
ml_events_registration="en",
|
||||
ml_sport_registration=True,
|
||||
ml_art_registration=True,
|
||||
VSS_charter_read=True
|
||||
))
|
||||
self.assertRedirects(response, reverse("registration:email_validation_sent"), 302, 200)
|
||||
self.assertTrue(User.objects.filter(username="toto").exists())
|
||||
@ -105,6 +106,7 @@ class TestSignup(TestCase):
|
||||
ml_events_registration="en",
|
||||
ml_sport_registration=True,
|
||||
ml_art_registration=True,
|
||||
VSS_charter_read=True
|
||||
))
|
||||
self.assertTrue(response.status_code, 200)
|
||||
|
||||
@ -124,6 +126,7 @@ class TestSignup(TestCase):
|
||||
ml_events_registration="en",
|
||||
ml_sport_registration=True,
|
||||
ml_art_registration=True,
|
||||
VSS_charter_read=True
|
||||
))
|
||||
self.assertTrue(response.status_code, 200)
|
||||
|
||||
@ -143,6 +146,27 @@ class TestSignup(TestCase):
|
||||
ml_events_registration="en",
|
||||
ml_sport_registration=True,
|
||||
ml_art_registration=True,
|
||||
VSS_charter_read=True
|
||||
))
|
||||
self.assertTrue(response.status_code, 200)
|
||||
|
||||
# The VSS charter is not read
|
||||
response = self.client.post(reverse("registration:signup"), dict(
|
||||
first_name="Toto",
|
||||
last_name="TOTO",
|
||||
username="Ihaveanotherusername",
|
||||
email="othertoto@example.com",
|
||||
password1="toto1234",
|
||||
password2="toto1234",
|
||||
phone_number="+33123456789",
|
||||
department="EXT",
|
||||
promotion=Club.objects.get(name="BDE").membership_start.year,
|
||||
address="Earth",
|
||||
paid=False,
|
||||
ml_events_registration="en",
|
||||
ml_sport_registration=True,
|
||||
ml_art_registration=True,
|
||||
VSS_charter_read=False
|
||||
))
|
||||
self.assertTrue(response.status_code, 200)
|
||||
|
||||
|
Reference in New Issue
Block a user