from typing import Any from unittest import mock from anydi import Container from app.handlers import SongwhipFanConsentHandler from app.main import handle def test_handle(container: Container, test_event: dict[str, Any]) -> None: handler_mock = mock.MagicMock(spec=SongwhipFanConsentHandler) with container.override(SongwhipFanConsentHandler, instance=handler_mock): response = handle(test_event, None) assert response == {"status": "OK"}