File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
stac_fastapi/elasticsearch/tests Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,6 @@ class Config:
6464
6565@pytest .fixture (scope = "session" )
6666def event_loop ():
67- # asyncio.new_event_loop().run_until_complete()
68-
69- # loop = asyncio.new_event_loop()
70- # yield loop
71- # loop.close()
72-
7367 loop = asyncio .new_event_loop ()
7468 asyncio .set_event_loop (loop )
7569 yield loop
Original file line number Diff line number Diff line change 1+ import pytest
2+
3+
4+ @pytest .mark .asyncio
5+ async def test_ping_no_param (app_client ):
6+ """
7+ Test ping endpoint with a mocked client.
8+ Args:
9+ app_client (TestClient): mocked client fixture
10+ """
11+ res = await app_client .get ("/_mgmt/ping" )
12+ assert res .status_code == 200
13+ assert res .json () == {"message" : "PONG" }
You can’t perform that action at this time.
0 commit comments