Skip to content

event_handler_service_locator

Scope: function | Returns: DependencyContainer

The event_handler_service_locator fixture bootstraps and sets the global service locator with the event handler's component registrations. Use it in tests that trigger or handle events.

Basic usage

@pytest.mark.usefixtures("event_handler_service_locator")
def test_event_is_handled():
    ...