Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor config flow tests in generic camera #134385

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reinstate fixture that is stll used
  • Loading branch information
davet2001 committed Jan 9, 2025
commit 2d136b1149ffd7e8e585bfbe626237f03d11b978
10 changes: 10 additions & 0 deletions tests/components/generic/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,13 @@ def config_entry_fixture(hass: HomeAssistant) -> MockConfigEntry:
)
entry.add_to_hass(hass)
return entry


@pytest.fixture(name="setup_entry")
async def setup_entry_fixture(
hass: HomeAssistant, config_entry: MockConfigEntry
) -> MockConfigEntry:
"""Set up a config entry ready to be used in tests."""
await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()
return config_entry