This commit is contained in:
2025-10-14 15:37:37 -05:00
commit 6821e717cd
39 changed files with 3346 additions and 0 deletions

0
tests/__init__.py Normal file
View File

38
tests/test_api.py Normal file
View File

@@ -0,0 +1,38 @@
import pytest
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_root():
"""Test root endpoint"""
response = client.get("/")
assert response.status_code == 200
data = response.json()
assert "message" in data
assert "version" in data
def test_health():
"""Test health check endpoint"""
response = client.get("/health")
assert response.status_code == 200
data = response.json()
assert data["status"] == "healthy"
# Add more tests as needed
# def test_upload_artifact():
# """Test artifact upload"""
# files = {"file": ("test.csv", b"test,data\n1,2", "text/csv")}
# data = {
# "test_name": "sample_test",
# "test_suite": "unit",
# "test_result": "pass"
# }
# response = client.post("/api/v1/artifacts/upload", files=files, data=data)
# assert response.status_code == 201
# artifact = response.json()
# assert artifact["filename"] == "test.csv"
# assert artifact["test_name"] == "sample_test"