mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add missing mock in agent_dvr config flow tests (#89361)
This commit is contained in:
parent
959c2205d5
commit
23698eb99f
14
tests/components/agent_dvr/conftest.py
Normal file
14
tests/components/agent_dvr/conftest.py
Normal file
@ -0,0 +1,14 @@
|
||||
"""Test fixtures for Agent DVR."""
|
||||
from collections.abc import Generator
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
"""Override async_setup_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.agent_dvr.async_setup_entry", return_value=True
|
||||
) as mock_setup_entry:
|
||||
yield mock_setup_entry
|
@ -1,4 +1,6 @@
|
||||
"""Tests for the Agent DVR config flow."""
|
||||
import pytest
|
||||
|
||||
from homeassistant import data_entry_flow
|
||||
from homeassistant.components.agent_dvr import config_flow
|
||||
from homeassistant.components.agent_dvr.const import SERVER_URL
|
||||
@ -11,6 +13,8 @@ from . import init_integration
|
||||
from tests.common import load_fixture
|
||||
from tests.test_util.aiohttp import AiohttpClientMocker
|
||||
|
||||
pytestmark = pytest.mark.usefixtures("mock_setup_entry")
|
||||
|
||||
|
||||
async def test_show_user_form(hass: HomeAssistant) -> None:
|
||||
"""Test that the user set up form is served."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user