diff --git a/tests/scene_server_test.py b/tests/scene_server_test.py index 095c2aa..904e545 100644 --- a/tests/scene_server_test.py +++ b/tests/scene_server_test.py @@ -20,14 +20,15 @@ async def fetch(ac: AsyncClient, url): async def post(ac: AsyncClient, url, payload={}): response = await ac.post(url, json=payload) - if response.status_code != 200: + if response.status_code not in [200, 400]: response.raise_for_status() + return response.json() async def spam_objects(ac: AsyncClient, count: int): tasks = [] for i in range(count): - object = Object(id=i, tick=f"") + object = Object(id=i, tick=f"", ) task = asyncio.create_task(TestSceneServer.post( ac, "/add_object", {'serialized_object': object.serialize()})) tasks.append(task)