File size: 512 Bytes
c8f4a46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pytest
from fastapi.testclient import TestClient
from app.main import app
from app.core.db import Base, engine

client = TestClient(app)

def test_health_endpoint():
    response = client.get("/api/health")
    assert response.status_code == 200
    assert response.json()["status"] == "ok"

def test_upload_missing_file():
    response = client.post("/api/resumes/upload", headers={"X-Session-Id": "test-session"})
    assert response.status_code == 422  # FastAPI validation error for missing form data