tests/components/google/conftest.py
def mock_calendars_yaml(
    hass: HomeAssistant,
    calendars_config: list[dict[str, Any]],
) -> Generator[Mock, None, None]:
    """Fixture that prepares the google_calendars.yaml mocks."""
    mocked_open_function = mock_open(read_data=yaml.dump(calendars_config))
    with patch("homeassistant.components.google.open", mocked_open_function):
        yield mocked_open_function
Fixture that prepares the google_calendars.yaml mocks.
Fixture that prepares the google_calendars.yaml mocks.
Fixture that prepares the google_calendars . yaml mocks .
def mock_calendars_yaml(
    hass: HomeAssistant,
    calendars_config: list[dict[str, Any]],
) -> Generator[Mock, None, None]:
    mocked_open_function = mock_open(read_data=yaml.dump(calendars_config))
    with patch("homeassistant.components.google.open", mocked_open_function):
        yield mocked_open_function
def mock_calendars_yaml ( hass : HomeAssistant , calendars_config : list [ dict [ str , Any ] ] , ) -> Generator [ Mock , None , None ] : mocked_open_function = mock_open ( read_data = yaml . dump ( calendars_config ) ) with patch ( "homeassistant.components.google.open" , mocked_open_function ) : yield mocked_open_function
Fixture that prepares the google_calendars.yaml mocks.
Fixture that prepares the google_calendars . yaml mocks .
"""Fixture that prepares the google_calendars.yaml mocks."""
hass
HomeAssistant
calendars_config
list[dict[str, Any]]