mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-10-31 15:40:01 +01:00 
			
		
		
		
	Test sur les tirages au sort réparé
This commit is contained in:
		| @@ -1,6 +1,5 @@ | ||||
| # Copyright (C) 2023 by Animath | ||||
| # SPDX-License-Identifier: GPL-3.0-or-later | ||||
| import asyncio | ||||
| from random import shuffle | ||||
|  | ||||
| from asgiref.sync import sync_to_async | ||||
| @@ -712,15 +711,12 @@ class TestDraw(TestCase): | ||||
|                          {'tid': tid, 'type': 'export_visibility', 'visible': False}) | ||||
|  | ||||
|         # Cancel all steps and reset all | ||||
|         for i in range(1000): | ||||
|         for i in range(150): | ||||
|             await communicator.send_json_to({'tid': tid, 'type': 'cancel'}) | ||||
|  | ||||
|         # Purge receive queue | ||||
|         while True: | ||||
|             try: | ||||
|                 await communicator.receive_json_from() | ||||
|             except asyncio.TimeoutError: | ||||
|                 break | ||||
|         while (await communicator.receive_json_from())['type'] != "abort": | ||||
|             pass | ||||
|  | ||||
|         if await Draw.objects.filter(tournament_id=tid).aexists(): | ||||
|             print((await Draw.objects.filter(tournament_id=tid).aexists())) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user