Skip to content

Commit

Permalink
Update fastapi-simple example
Browse files Browse the repository at this point in the history
  • Loading branch information
rmk135 committed Oct 28, 2021
1 parent 14744e4 commit 485d6e7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/miniapps/fastapi-simple/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@


@pytest.fixture
def client(event_loop):
client = AsyncClient(app=app, base_url="http://test")
yield client
event_loop.run_until_complete(client.aclose())
async def client(event_loop):
async with AsyncClient(app=app, base_url="http://test") as client:
yield client


@pytest.mark.asyncio
Expand Down

0 comments on commit 485d6e7

Please sign in to comment.