1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-27 08:53:02 +00:00

Compare commits

..

No commits in common. "44302a9ff40b8860b208527a928fee2363e502ad" and "dd397ae7c0288ac1ea76abd4c4e353f3d91086f6" have entirely different histories.

4 changed files with 17 additions and 17 deletions

View File

@ -71,7 +71,7 @@ class TestDraw(TestCase):
resp = await communicator.receive_json_from()
self.assertEqual(resp['type'], 'alert')
self.assertEqual(resp['alert_type'], 'danger')
self.assertEqual(resp['message'], "La somme doit être égale au nombre d'équipes : attendu 12, obtenu 3")
self.assertEqual(resp['message'], "The sum must be equal to the number of teams: expected 12, got 3")
self.assertFalse(await Draw.objects.filter(tournament=self.tournament).aexists())
# Now start the draw
@ -113,7 +113,7 @@ class TestDraw(TestCase):
resp = await communicator.receive_json_from()
self.assertEqual(resp['type'], 'alert')
self.assertEqual(resp['alert_type'], 'danger')
self.assertEqual(resp['message'], "Le tirage a déjà commencé.")
self.assertEqual(resp['message'], "The draw is already started.")
draw: Draw = await Draw.objects.prefetch_related(
'current_round__current_pool__current_team__participation__team').aget(tournament=self.tournament)
@ -135,7 +135,7 @@ class TestDraw(TestCase):
await communicator.send_json_to({'tid': tid, 'type': "dice", 'trigram': team.trigram})
resp = await communicator.receive_json_from()
self.assertEqual(resp['type'], 'alert')
self.assertEqual(resp['message'], "Vous avez déjà lancé le dé.")
self.assertEqual(resp['message'], "You've already launched the dice.")
# Force exactly one duplicate
await td.arefresh_from_db()
@ -207,7 +207,7 @@ class TestDraw(TestCase):
await communicator.send_json_to({'tid': tid, 'type': "dice", 'trigram': trigram})
resp = await communicator.receive_json_from()
self.assertEqual(resp['type'], 'alert')
self.assertEqual(resp['message'], "Vous avez déjà lancé le dé.")
self.assertEqual(resp['message'], "You've already launched the dice.")
# Force exactly one duplicate
await td.arefresh_from_db()
@ -254,7 +254,7 @@ class TestDraw(TestCase):
await communicator.send_json_to({'tid': tid, 'type': 'dice', 'trigram': None})
resp = await communicator.receive_json_from()
self.assertEqual(resp['type'], 'alert')
self.assertEqual(resp['message'], "Ce n'est pas le moment pour cela.")
self.assertEqual(resp['message'], "This is not the time for this.")
# Draw a problem
await communicator.send_json_to({'tid': tid, 'type': 'draw_problem'})
@ -277,7 +277,7 @@ class TestDraw(TestCase):
await communicator.send_json_to({'tid': tid, 'type': 'draw_problem'})
resp = await communicator.receive_json_from()
self.assertEqual(resp['type'], 'alert')
self.assertEqual(resp['message'], "Ce n'est pas le moment pour cela.")
self.assertEqual(resp['message'], "This is not the time for this.")
# Reject the first problem
await communicator.send_json_to({'tid': tid, 'type': 'reject'})

View File

@ -1931,7 +1931,7 @@ class PassageDetailView(LoginRequiredMixin, DetailView):
or reg in passage.pool.juries.all()
or reg.pools_presided.filter(tournament=passage.pool.tournament).exists()) \
or reg.participates and reg.team \
and reg.team.participation in [passage.defender, passage.opponent, passage.reviewer, passage.observer]:
and reg.team.participation in [passage.defender, passage.opponent, passage.reviewer]:
return super().dispatch(request, *args, **kwargs)
return self.handle_no_permission()

View File

@ -18,8 +18,8 @@ Including another URLconf
"""
from django.conf import settings
from django.contrib import admin
from django.urls import include, path
from django.utils.translation import gettext_lazy as _
from django.urls import include, path
from django.views.defaults import bad_request, page_not_found, permission_denied, server_error
from django.views.generic import TemplateView
from participation.views import MotivationLetterView