From ea03bd314bce427f07e6bca9fea90591ecaf0855 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Fri, 7 Jun 2024 16:39:43 +0200 Subject: [PATCH] Fix tests with new stuff Signed-off-by: Emmy D'Anello --- draw/consumers.py | 2 +- registration/tests.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/draw/consumers.py b/draw/consumers.py index a62f164..ec7ba31 100644 --- a/draw/consumers.py +++ b/draw/consumers.py @@ -532,7 +532,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer): 'visible': True}) # 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}", {'tid': self.tournament_id, 'type': 'draw.send_poules', 'round': r.number, diff --git a/registration/tests.py b/registration/tests.py index 50b22a0..289459b 100644 --- a/registration/tests.py +++ b/registration/tests.py @@ -146,6 +146,7 @@ class TestRegistration(TestCase): address="1 Rue de Rivoli", zip_code=75001, city="Paris", + country="France", phone_number="0123456789", responsible_name="Toto", responsible_phone="0123456789", @@ -194,6 +195,7 @@ class TestRegistration(TestCase): address="1 Rue de Rivoli", zip_code=75001, city="Paris", + country="France", phone_number="0123456789", professional_activity="God", last_degree="Master", @@ -274,11 +276,13 @@ class TestRegistration(TestCase): 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", 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_email="toto@example.com")), (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,))) self.assertEqual(response.status_code, 200)