Test dashboard: full menu system, all-service tests, filtering
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m11s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m11s
- Run tests for all 10 services via per-service pytest subprocesses - Group results by service with section headers - Clickable summary cards filter by outcome (passed/failed/errors/skipped) - Service filter nav using ~nav-link buttons in menu bar - Full menu integration: ~header-row + ~header-child + ~menu-row - Show logo image via cart-mini rendering - Mount full service directories in docker-compose for test access - Add 24 unit test files across 9 services Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
30
events/tests/conftest.py
Normal file
30
events/tests/conftest.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""Events test fixtures — direct module loading to avoid bp __init__ chains."""
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib.util
|
||||
import sys
|
||||
|
||||
|
||||
def _load(name: str, path: str):
|
||||
"""Import a .py file directly, bypassing package __init__ chains."""
|
||||
if name in sys.modules:
|
||||
return sys.modules[name]
|
||||
spec = importlib.util.spec_from_file_location(name, path)
|
||||
mod = importlib.util.module_from_spec(spec)
|
||||
sys.modules[name] = mod
|
||||
spec.loader.exec_module(mod)
|
||||
return mod
|
||||
|
||||
|
||||
# Ensure events/models is importable as 'models'
|
||||
sys.path.insert(0, "/app/events")
|
||||
|
||||
# Pre-load target modules that would fail via normal package import
|
||||
_load("events.bp.calendar.services.calendar_view",
|
||||
"/app/events/bp/calendar/services/calendar_view.py")
|
||||
_load("events.bp.calendar.services.slots",
|
||||
"/app/events/bp/calendar/services/slots.py")
|
||||
_load("events.bp.calendars.services.calendars",
|
||||
"/app/events/bp/calendars/services/calendars.py")
|
||||
_load("events.bp.calendar_entries.routes",
|
||||
"/app/events/bp/calendar_entries/routes.py")
|
||||
Reference in New Issue
Block a user