parent
c8b724fd29
commit
d5d204c642
@ -0,0 +1,10 @@
|
||||
import pytest
|
||||
import requests
|
||||
|
||||
BASE_URL = "http://localhost:8000"
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def api_client():
|
||||
"""Fixture for API client"""
|
||||
return requests.Session()
|
||||
@ -0,0 +1,17 @@
|
||||
import pytest
|
||||
import requests
|
||||
from typing import Dict, Any
|
||||
from .conftest import BASE_URL
|
||||
|
||||
|
||||
class TestHealthCheck:
|
||||
"""health check endpoint"""
|
||||
|
||||
def test_health_endpoint(self, api_client):
|
||||
"""For /health endpoint"""
|
||||
response = api_client.get(f"{BASE_URL}/health")
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert "status" in data
|
||||
assert data["status"] == "healthy"
|
||||
assert "model_loaded" in data
|
||||
Loading…
Reference in new issue