mirror of
https://github.com/home-assistant/core.git
synced 2026-04-17 23:53:49 +01:00
Mock async_setup_entry in panasonic_viera config flow tests (#164385)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
"""Test the Panasonic Viera config flow."""
|
||||
|
||||
from unittest.mock import patch
|
||||
from collections.abc import Generator
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
from panasonic_viera import SOAPError
|
||||
import pytest
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components.panasonic_viera.const import (
|
||||
@@ -26,6 +28,16 @@ from .conftest import (
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_setup_entry() -> Generator[AsyncMock]:
|
||||
"""Mock setting up a config entry."""
|
||||
with patch(
|
||||
"homeassistant.components.panasonic_viera.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup:
|
||||
yield mock_setup
|
||||
|
||||
|
||||
async def test_flow_non_encrypted(hass: HomeAssistant) -> None:
|
||||
"""Test flow without encryption."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user