Skip to content

Commit

Permalink
fix ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
stickpin committed Dec 14, 2024
1 parent a833fc1 commit 890f0a9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
15 changes: 9 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ def auto_enable_custom_integrations(enable_custom_integrations):
@pytest.fixture
def bypass_setup_fixture():
"""Prevent setup."""
with patch(
"custom_components.volkswagencarnet.async_setup",
return_value=True,
), patch(
"custom_components.volkswagencarnet.async_setup_entry",
return_value=True,
with (
patch(
"custom_components.volkswagencarnet.async_setup",
return_value=True,
),
patch(
"custom_components.volkswagencarnet.async_setup_entry",
return_value=True,
),
):
yield

Expand Down
9 changes: 5 additions & 4 deletions tests/util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ async def test_get_coordinator(hass: HomeAssistant):
}

# We want to skip the actual setup flow here
with patch.object(
homeassistant.config_entries.ConfigEntries, "async_setup"
) as flow, patch.object(
homeassistant.config_entries.ConfigEntries, "_async_schedule_save"
with (
patch.object(homeassistant.config_entries.ConfigEntries, "async_setup") as flow,
patch.object(
homeassistant.config_entries.ConfigEntries, "_async_schedule_save"
),
):
f: Future = Future()
f.set_result(True)
Expand Down

0 comments on commit 890f0a9

Please sign in to comment.