Spaces:
Runtime error
Runtime error
File size: 639 Bytes
66340f1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
from httpx import AsyncClient
from app.core.config import settings
from app.models.user import User
from tests.utils import get_jwt_header
class TestQuery:
async def test_query(
self,
client: AsyncClient,
create_user,
):
user: User = await create_user()
jwt_header = get_jwt_header(user)
payload = {
"query": "What is the meaning of life?",
"document_id": 11,
}
resp = await client.post(
settings.API_PATH + "/queries/",
json=payload,
headers=jwt_header,
)
assert resp.status_code == 200
|