Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /SHAdd0WTAka_Zen-Ai-Pentest /tests /e2e /test_api_e2e.py
| """ | |
| E2E 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 TestAPIAuthE2E: | |
| """E2E Tests for Auth Endpoints""" | |
| async def test_health_check(self): | |
| """Test health check endpoint""" | |
| from api.routes.v1.health import health_check | |
| result = await health_check() | |
| assert result["status"] == "healthy" | |
| async def test_api_info(self): | |
| """Test API info endpoint""" | |
| from api.routes.v1.health import api_info | |
| result = await api_info() | |
| assert "name" in result | |
| assert "version" in result | |
| class TestAPIToolsE2E: | |
| """E2E Tests for Tools Endpoints""" | |
| async def test_list_tools(self): | |
| """Test list tools endpoint""" | |
| from api.routes.v1.tools import list_tools | |
| result = await list_tools(user=None) | |
| assert "tools" in result | |
| assert len(result["tools"]) > 0 | |
| class TestAPIStatsE2E: | |
| """E2E Tests for Stats Endpoints""" | |
| async def test_stats_overview(self): | |
| """Test stats overview endpoint""" | |
| from api.routes.v1.stats import get_stats_overview | |
| result = await get_stats_overview(user={"sub": "test"}) | |
| assert "total_scans" in result | |
| assert "total_findings" in result | |
| if __name__ == "__main__": | |
| pytest.main([__file__, "-v"]) | |
Xet Storage Details
- Size:
- 1.57 kB
- Xet hash:
- 8a0266876645202f4b85a2873eb7a79d69b6d42af22b12e00477aa49a5061720
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.