mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-22 10:28:21 +02:00
Correction des tests et autres
This commit is contained in:
@ -337,7 +337,7 @@ class TestWEIRegistration(TestCase):
|
||||
emergency_contact_phone='+33123456789',
|
||||
bus=[self.bus.id],
|
||||
team=[self.team.id],
|
||||
roles=[role.id for role in WEIRole.objects.filter(~Q(name="1A")).all()],
|
||||
roles=[role.id for role in WEIRole.objects.filter(~Q(name="1A") & ~Q(name="GC WEI")).all()],
|
||||
caution_type='check'
|
||||
))
|
||||
qs = WEIRegistration.objects.filter(user_id=user.id)
|
||||
@ -632,7 +632,7 @@ class TestWEIRegistration(TestCase):
|
||||
second_bus = Bus.objects.create(wei=self.wei, name="Second bus")
|
||||
second_team = BusTeam.objects.create(bus=second_bus, name="Second team", color=42)
|
||||
response = self.client.post(reverse("wei:validate_registration", kwargs=dict(pk=self.registration.pk)), dict(
|
||||
roles=[WEIRole.objects.get(name="GC WEI").id],
|
||||
roles=[WEIRole.objects.get(name="Adhérent⋅e WEI").id],
|
||||
bus=self.bus.pk,
|
||||
team=second_team.pk,
|
||||
credit_type=4, # Bank transfer
|
||||
@ -647,7 +647,7 @@ class TestWEIRegistration(TestCase):
|
||||
self.assertTrue("This team doesn't belong to the given bus." in str(response.context["form"].errors))
|
||||
|
||||
response = self.client.post(reverse("wei:validate_registration", kwargs=dict(pk=self.registration.pk)), dict(
|
||||
roles=[WEIRole.objects.get(name="GC WEI").id],
|
||||
roles=[WEIRole.objects.get(name="Adhérent⋅e WEI").id],
|
||||
bus=self.bus.pk,
|
||||
team=self.team.pk,
|
||||
credit_type=4, # Bank transfer
|
||||
|
Reference in New Issue
Block a user