Files
willhaben-tracker/worker/tests/test_health.py
Lago 8151c530da
CI / lint-and-test (push) Has been cancelled
feat: Phase 3 — web dashboard, testing, and CI/CD
- 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
2026-07-10 22:28:18 +02:00

30 lines
957 B
Python

"""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