1
0
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:
Franck Nijhof
2026-02-27 20:30:25 +01:00
committed by GitHub
parent 177a918c26
commit 4f05c807b0

View File

@@ -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."""