Creates a FastAPIAppAdapter app instance for testing.
(core_lifecycle_td: AstrBotCoreLifecycle)
| 245 | |
| 246 | @pytest.fixture(scope="module") |
| 247 | def 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 | |
| 256 | def _resolve_dashboard_password(core_lifecycle_td: AstrBotCoreLifecycle) -> str: |
nothing calls this directly
no test coverage detected