tests/components/google/conftest.py
def mock_events_list(
    aioclient_mock: AiohttpClientMocker,
) -> ApiResult:
    """Fixture to construct a fake event list API response."""

    def _put_result(
        response: dict[str, Any],
        calendar_id: str = None,
        exc: ClientError | None = None,
    ) -> None:
        if calendar_id is None:
            calendar_id = CALENDAR_ID
        aioclient_mock.get(
            f"{API_BASE_URL}/calendars/{calendar_id}/events",
            json=response,
            exc=exc,
        )
        return

    return _put_result
Fixture to construct a fake event list API response.
Fixture to construct a fake event list API response.
Fixture to construct a fake event list API response .
def mock_events_list(
    aioclient_mock: AiohttpClientMocker,
) -> ApiResult:
    def _put_result(
        response: dict[str, Any],
        calendar_id: str = None,
        exc: ClientError | None = None,
    ) -> None:
        if calendar_id is None:
            calendar_id = CALENDAR_ID
        aioclient_mock.get(
            f"{API_BASE_URL}/calendars/{calendar_id}/events",
            json=response,
            exc=exc,
        )
        return
    return _put_result
def mock_events_list ( aioclient_mock : AiohttpClientMocker , ) -> ApiResult : def _put_result ( response : dict [ str , Any ] , calendar_id : str = None , exc : ClientError | None = None , ) -> None : if calendar_id is None : calendar_id = CALENDAR_ID aioclient_mock . get ( f"{API_BASE_URL}/calendars/{calendar_id}/events" , json = response , exc = exc , ) return return _put_result
Fixture to construct a fake event list API response.
Fixture to construct a fake event list API response .
"""Fixture to construct a fake event list API response."""
aioclient_mock
AiohttpClientMocker