tests/components/google/conftest.py
def config_entry(
    token_scopes: list[str],
    config_entry_token_expiry: float,
    config_entry_options: dict[str, Any] | None,
) -> MockConfigEntry:
    """Fixture to create a config entry for the integration."""
    return MockConfigEntry(
        domain=DOMAIN,
        data={
            "auth_implementation": "device_auth",
            "token": {
                "access_token": "ACCESS_TOKEN",
                "refresh_token": "REFRESH_TOKEN",
                "scope": " ".join(token_scopes),
                "token_type": "Bearer",
                "expires_at": config_entry_token_expiry,
            },
        },
        options=config_entry_options,
    )
Fixture to create a config entry for the integration.
Fixture to create a config entry for the integration.
Fixture to create a config entry for the integration .
def config_entry(
    token_scopes: list[str],
    config_entry_token_expiry: float,
    config_entry_options: dict[str, Any] | None,
) -> MockConfigEntry:
    return MockConfigEntry(
        domain=DOMAIN,
        data={
            "auth_implementation": "device_auth",
            "token": {
                "access_token": "ACCESS_TOKEN",
                "refresh_token": "REFRESH_TOKEN",
                "scope": " ".join(token_scopes),
                "token_type": "Bearer",
                "expires_at": config_entry_token_expiry,
            },
        },
        options=config_entry_options,
    )
def config_entry ( token_scopes : list [ str ] , config_entry_token_expiry : float , config_entry_options : dict [ str , Any ] | None , ) -> MockConfigEntry : return MockConfigEntry ( domain = DOMAIN , data = { "auth_implementation" : "device_auth" , "token" : { "access_token" : "ACCESS_TOKEN" , "refresh_token" : "REFRESH_TOKEN" , "scope" : " " . join ( token_scopes ) , "token_type" : "Bearer" , "expires_at" : config_entry_token_expiry , } , } , options = config_entry_options , )
Fixture to create a config entry for the integration.
Fixture to create a config entry for the integration .
"""Fixture to create a config entry for the integration."""
token_scopes
list[str]
config_entry_token_expiry
float
config_entry_options
dict[str, Any] | None