1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 05:42:23 +00:00

Fix tests with new stuff

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-06-07 16:39:43 +02:00
parent c12972b718
commit ea03bd314b
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 7 additions and 3 deletions

View File

@ -532,7 +532,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
'visible': True}) 'visible': True})
# First send the second pool to have the good team order # First send the second pool to have the good team order
for r in self.tournament.draw.round_set.filter(number__gte=2).all(): async for r in self.tournament.draw.round_set.filter(number__gte=2).all():
await self.channel_layer.group_send(f"tournament-{self.tournament.id}", await self.channel_layer.group_send(f"tournament-{self.tournament.id}",
{'tid': self.tournament_id, 'type': 'draw.send_poules', {'tid': self.tournament_id, 'type': 'draw.send_poules',
'round': r.number, 'round': r.number,

View File

@ -146,6 +146,7 @@ class TestRegistration(TestCase):
address="1 Rue de Rivoli", address="1 Rue de Rivoli",
zip_code=75001, zip_code=75001,
city="Paris", city="Paris",
country="France",
phone_number="0123456789", phone_number="0123456789",
responsible_name="Toto", responsible_name="Toto",
responsible_phone="0123456789", responsible_phone="0123456789",
@ -194,6 +195,7 @@ class TestRegistration(TestCase):
address="1 Rue de Rivoli", address="1 Rue de Rivoli",
zip_code=75001, zip_code=75001,
city="Paris", city="Paris",
country="France",
phone_number="0123456789", phone_number="0123456789",
professional_activity="God", professional_activity="God",
last_degree="Master", last_degree="Master",
@ -274,11 +276,13 @@ class TestRegistration(TestCase):
for user, data in [(self.user, dict(professional_activity="Bot", admin=True)), for user, data in [(self.user, dict(professional_activity="Bot", admin=True)),
(self.student, dict(student_class=11, school="Sky", birth_date="2001-01-01", (self.student, dict(student_class=11, school="Sky", birth_date="2001-01-01",
gender="female", address="1 Rue de Rivoli", zip_code=75001, gender="female", address="1 Rue de Rivoli", zip_code=75001,
city="Paris", responsible_name="Toto", city="Paris", country="France",
responsible_name="Toto",
responsible_phone="0123456789", responsible_phone="0123456789",
responsible_email="toto@example.com")), responsible_email="toto@example.com")),
(self.coach, dict(professional_activity="God", last_degree="Médaille Fields", gender="male", (self.coach, dict(professional_activity="God", last_degree="Médaille Fields", gender="male",
address="1 Rue de Rivoli", zip_code=75001, city="Paris"))]: address="1 Rue de Rivoli", zip_code=75001,
city="Paris", country="France"))]:
response = self.client.get(reverse("registration:update_user", args=(user.pk,))) response = self.client.get(reverse("registration:update_user", args=(user.pk,)))
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)