mirror of
https://github.com/not-kennethreitz/requests-async.git
synced 2026-06-05 06:56:15 +00:00
14 lines
306 B
Python
14 lines
306 B
Python
from starlette.responses import JSONResponse
|
|
import requests_async as requests
|
|
import pytest
|
|
|
|
|
|
app = JSONResponse({"hello": "world"})
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_the_test_client():
|
|
client = requests.ASGISession(app)
|
|
response = await client.get('/')
|
|
assert response.status_code == 200
|