Skip to content

Commit

Permalink
fix: fix test (#36)
Browse files Browse the repository at this point in the history
Co-authored-by: Krystian Jandy <krystianj@meritus.pl>
  • Loading branch information
Krystian030 and Krystian Jandy authored Oct 24, 2023
1 parent 986416f commit 3878c26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/scene_server_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3878c26

Please sign in to comment.