Spaces:
Sleeping
Sleeping
File size: 352 Bytes
dacf14a |
1 2 3 4 5 6 7 8 9 10 11 12 |
import pytest
from fastapi.testclient import TestClient
from backend.app.main import app
client = TestClient(app)
def test_get_answer():
response = client.post("/qa/", json={"context": "Hello world", "question": "What is this?"})
assert response.status_code == 200
assert "answer" in response.json()
assert "score" in response.json()
|