Add missing mock in azure event hub config flow tests (#89355)
parent
2ec78ae70e
commit
ea6a95176d
|
@ -117,7 +117,7 @@ def mock_from_connection_string_fixture():
|
|||
yield from_conn_string
|
||||
|
||||
|
||||
@pytest.fixture(name="mock_setup_entry")
|
||||
@pytest.fixture
|
||||
def mock_setup_entry():
|
||||
"""Mock the setup entry call, used for config flow tests."""
|
||||
with patch(
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"""Test the AEH config flow."""
|
||||
import logging
|
||||
from unittest.mock import AsyncMock
|
||||
|
||||
from azure.eventhub.exceptions import EventHubError
|
||||
import pytest
|
||||
|
@ -29,6 +30,8 @@ from tests.common import MockConfigEntry
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
pytestmark = pytest.mark.usefixtures("mock_setup_entry")
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("step1_config", "step_id", "step2_config", "data_config"),
|
||||
|
@ -40,7 +43,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||
)
|
||||
async def test_form(
|
||||
hass: HomeAssistant,
|
||||
mock_setup_entry,
|
||||
mock_setup_entry: AsyncMock,
|
||||
mock_from_connection_string,
|
||||
step1_config,
|
||||
step_id,
|
||||
|
@ -70,7 +73,7 @@ async def test_form(
|
|||
mock_setup_entry.assert_called_once()
|
||||
|
||||
|
||||
async def test_import(hass: HomeAssistant, mock_setup_entry) -> None:
|
||||
async def test_import(hass: HomeAssistant, mock_setup_entry: AsyncMock) -> None:
|
||||
"""Test we get the form."""
|
||||
|
||||
import_config = IMPORT_CONFIG.copy()
|
||||
|
|
Loading…
Reference in New Issue