- Remove multi-marketplace from Phase 3 - Add FastAPI web UI on port 8766 with basic auth - Add 6 Jinja2 templates (dashboard, keywords, users, ads, stats) - Add pytest test suite (45 tests, 49% coverage) - Add GitHub Actions CI/CD workflow - Update docker-compose.yml to expose web UI port - Update Dockerfile to include tests
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""Tests for health module."""
|
||||
|
||||
from health import create_health_app
|
||||
|
||||
|
||||
class TestHealthModule:
|
||||
"""Basic import and app creation tests for the health module."""
|
||||
|
||||
def test_health_module_import(self):
|
||||
"""Health module should be importable."""
|
||||
import health
|
||||
assert health is not None
|
||||
|
||||
def test_create_health_app_returns_app(self):
|
||||
"""create_health_app should return an aiohttp web.Application."""
|
||||
app = create_health_app()
|
||||
assert app is not None
|
||||
assert hasattr(app, "router")
|
||||
|
||||
def test_health_app_has_routes(self):
|
||||
"""Health app should have /health and /stats routes."""
|
||||
app = create_health_app()
|
||||
# Collect route info from the router
|
||||
routes_info = []
|
||||
for route in app.router.routes():
|
||||
routes_info.append(repr(route))
|
||||
routes_str = " ".join(routes_info)
|
||||
assert "/health" in routes_str
|
||||
assert "/stats" in routes_str
|
||||
Reference in New Issue
Block a user