Create an App with a mocked event processor that has a root context. Returns: An App instance with a mock event processor and root context.
()
| 3400 | |
| 3401 | @pytest.fixture |
| 3402 | def app_with_processor() -> App: |
| 3403 | """Create an App with a mocked event processor that has a root context. |
| 3404 | |
| 3405 | Returns: |
| 3406 | An App instance with a mock event processor and root context. |
| 3407 | """ |
| 3408 | app = App(_state=EmptyState) |
| 3409 | root_context = EventContext( |
| 3410 | token="", |
| 3411 | state_manager=StateManagerMemory(), |
| 3412 | enqueue_impl=AsyncMock(), |
| 3413 | ) |
| 3414 | processor = Mock() |
| 3415 | processor._root_context = root_context |
| 3416 | app._event_processor = processor |
| 3417 | return app |
| 3418 | |
| 3419 | |
| 3420 | @pytest.fixture |
nothing calls this directly
no test coverage detected