Files
requests-async/tests/test_asgi.py
T
2019-03-21 16:22:13 +00:00

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