MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / app

Function app

tests/test_dashboard.py:247–253  ·  view source on GitHub ↗

Creates a FastAPIAppAdapter app instance for testing.

(core_lifecycle_td: AstrBotCoreLifecycle)

Source from the content-addressed store, hash-verified

245
246@pytest.fixture(scope="module")
247def app(core_lifecycle_td: AstrBotCoreLifecycle):
248 """Creates a FastAPIAppAdapter app instance for testing."""
249 shutdown_event = asyncio.Event()
250 # The db instance is already part of the core_lifecycle_td
251 server = AstrBotDashboard(core_lifecycle_td, core_lifecycle_td.db, shutdown_event)
252 server.app._dashboard_server = server # expose for test cleanup
253 return server.app
254
255
256def _resolve_dashboard_password(core_lifecycle_td: AstrBotCoreLifecycle) -> str:

Callers

nothing calls this directly

Calls 1

AstrBotDashboardClass · 0.90

Tested by

no test coverage detected