Skip to content

Commit

Permalink
Remove unnecessary creds domain parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
allenporter committed Nov 7, 2023
1 parent 1d4cd30 commit 4f08154
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
1 change: 0 additions & 1 deletion tests/components/google/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ async def _setup_func() -> bool:
hass,
DOMAIN,
ClientCredential("client-id", "client-secret"),
DOMAIN,
)
config_entry.add_to_hass(hass)
return await hass.config_entries.async_setup(config_entry.entry_id)
Expand Down
23 changes: 12 additions & 11 deletions tests/components/google/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ async def test_expired_after_exchange(
) -> None:
"""Test credential exchange expires."""
await async_import_client_credential(
hass, DOMAIN, ClientCredential(CLIENT_ID, CLIENT_SECRET), "imported-cred"
hass,
DOMAIN,
ClientCredential(CLIENT_ID, CLIENT_SECRET),
)

result = await hass.config_entries.flow.async_init(
Expand Down Expand Up @@ -276,7 +278,6 @@ async def test_exchange_error(
hass,
DOMAIN,
ClientCredential(CLIENT_ID, CLIENT_SECRET),
DOMAIN,
)

result = await hass.config_entries.flow.async_init(
Expand Down Expand Up @@ -344,7 +345,7 @@ async def test_duplicate_config_entries(
) -> None:
"""Test that the same account cannot be setup twice."""
await async_import_client_credential(
hass, DOMAIN, ClientCredential(CLIENT_ID, CLIENT_SECRET), "imported-cred"
hass, DOMAIN, ClientCredential(CLIENT_ID, CLIENT_SECRET)
)

# Load a config entry
Expand Down Expand Up @@ -386,7 +387,7 @@ async def test_multiple_config_entries(
) -> None:
"""Test that multiple config entries can be set at once."""
await async_import_client_credential(
hass, DOMAIN, ClientCredential(CLIENT_ID, CLIENT_SECRET), "imported-cred"
hass, DOMAIN, ClientCredential(CLIENT_ID, CLIENT_SECRET)
)

# Load a config entry
Expand Down Expand Up @@ -483,7 +484,6 @@ async def test_reauth_flow(
hass,
DOMAIN,
ClientCredential(CLIENT_ID, CLIENT_SECRET),
DOMAIN,
)

entries = hass.config_entries.async_entries(DOMAIN)
Expand Down Expand Up @@ -559,7 +559,9 @@ async def test_calendar_lookup_failure(
) -> None:
"""Test successful config flow and title fetch fails gracefully."""
await async_import_client_credential(
hass, DOMAIN, ClientCredential(CLIENT_ID, CLIENT_SECRET), "device_auth"
hass,
DOMAIN,
ClientCredential(CLIENT_ID, CLIENT_SECRET),
)

result = await hass.config_entries.flow.async_init(
Expand Down Expand Up @@ -654,7 +656,9 @@ async def test_web_auth_compatibility(
) -> None:
"""Test that we can callback to web auth tokens."""
await async_import_client_credential(
hass, DOMAIN, ClientCredential(CLIENT_ID, CLIENT_SECRET), "imported-cred"
hass,
DOMAIN,
ClientCredential(CLIENT_ID, CLIENT_SECRET),
)

with patch(
Expand Down Expand Up @@ -743,10 +747,7 @@ async def test_web_reauth_flow(
)
config_entry.add_to_hass(hass)
await async_import_client_credential(
hass,
DOMAIN,
ClientCredential(CLIENT_ID, CLIENT_SECRET),
DOMAIN,
hass, DOMAIN, ClientCredential(CLIENT_ID, CLIENT_SECRET)
)

entries = hass.config_entries.async_entries(DOMAIN)
Expand Down

0 comments on commit 4f08154

Please sign in to comment.