Spaces:
Sleeping
Sleeping
File size: 562 Bytes
1441b40 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from fastapi.testclient import TestClient
from src.main import app
client = TestClient(app)
def test_coding_endpoint():
provider_notes = {
"notes": "Patient has a fever and cough."
}
response = client.post("/api/coding", json=provider_notes)
assert response.status_code == 200
data = response.json()
assert "CPT" in data
assert "ICD" in data
assert isinstance(data["CPT"], list)
assert isinstance(data["ICD"], list)
assert "explanation" in data["CPT"][0]
assert "explanation" in data["ICD"][0] |