Skip to content

Commit

Permalink
Adding a single aiohttp test with timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
mindflayer committed May 13, 2024
1 parent 0d2d8c5 commit 6a9d42f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/main/test_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ async def test_aiohttp():
headers={"content-type": "application/json"},
)

async with aiohttp.ClientSession() as session, session.get(url) as response:
async with aiohttp.ClientSession(
timeout=aiohttp.ClientTimeout(total=3)
) as session, session.get(url) as response:
response = await response.json()
assert response == data

0 comments on commit 6a9d42f

Please sign in to comment.