devjas1
Initial Release: Polymer Aging With ML [Standalone Appliance]
4a0e21d
Raw
History Blame Contribute Delete
509 Bytes
from fastapi.testclient import TestClient
from backend.main import app
client = TestClient(app)
def test_analyze_spectrum():
payload = {
"spectrum": {
"x_values": [200, 210], # At least 2 points
"y_values": [0.5, 0.6], # At least 2 points
"filename": "test.txt"
},
"modality": "raman",
"model_name": "figure2"
}
response = client.post("/api/v1/analyze", json=payload)
assert response.status_code == 200