Buckets:

download
raw
1.52 kB
"""
Integration Tests for API Endpoints
"""
import os
import sys
import pytest
sys.path.insert(
0,
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
)
class TestAPIHealth:
"""Test API Health Endpoints"""
def test_health_endpoint(self):
"""Test health check endpoint"""
import asyncio
from api.routes.v1.health import health_check
result = asyncio.run(health_check())
assert result["status"] == "healthy"
assert "version" in result
def test_info_endpoint(self):
"""Test info endpoint"""
import asyncio
from api.routes.v1.health import api_info
result = asyncio.run(api_info())
assert "name" in result
assert "version" in result
class TestAPITools:
"""Test API Tools Endpoints"""
@pytest.mark.asyncio
async def test_list_tools(self):
"""Test list tools endpoint"""
from api.routes.v1.tools import list_tools
result = await list_tools()
assert "tools" in result
assert len(result["tools"]) > 0
class TestAPIStats:
"""Test API Stats Endpoints"""
@pytest.mark.asyncio
async def test_stats_overview(self):
"""Test stats overview endpoint"""
from api.routes.v1.stats import get_stats_overview
result = await get_stats_overview()
assert "total_scans" in result
assert "total_findings" in result
if __name__ == "__main__":
pytest.main([__file__, "-v"])

Xet Storage Details

Size:
1.52 kB
·
Xet hash:
8df7415d9bd90fdd9e97e31e2f150ec87f86629ea98fe442353754b049ed00b5

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.