mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 04:50:17 +00:00
Google Assistant SDK: use setup_credentials in setup_integration (#153793)
This commit is contained in:
@@ -66,19 +66,13 @@ def mock_config_entry(expires_at: int, scopes: list[str]) -> MockConfigEntry:
|
||||
|
||||
@pytest.fixture(name="setup_integration")
|
||||
async def mock_setup_integration(
|
||||
hass: HomeAssistant, config_entry: MockConfigEntry
|
||||
hass: HomeAssistant,
|
||||
config_entry: MockConfigEntry,
|
||||
setup_credentials: None,
|
||||
) -> Callable[[], Coroutine[Any, Any, None]]:
|
||||
"""Fixture for setting up the component."""
|
||||
config_entry.add_to_hass(hass)
|
||||
|
||||
assert await async_setup_component(hass, "application_credentials", {})
|
||||
await async_import_client_credential(
|
||||
hass,
|
||||
DOMAIN,
|
||||
ClientCredential("client-id", "client-secret"),
|
||||
DOMAIN,
|
||||
)
|
||||
|
||||
async def func() -> None:
|
||||
assert await async_setup_component(hass, DOMAIN, {})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
Reference in New Issue
Block a user