Fix vizio async mock fixtures on Python 3.8.0 and .1 (#39926)
parent
bda66d1929
commit
aad6a24f28
|
@ -22,7 +22,7 @@ from .const import (
|
|||
MockStartPairingResponse,
|
||||
)
|
||||
|
||||
from tests.async_mock import patch
|
||||
from tests.async_mock import AsyncMock, patch
|
||||
|
||||
|
||||
class MockInput:
|
||||
|
@ -53,7 +53,7 @@ def vizio_get_unique_id_fixture():
|
|||
"""Mock get vizio unique ID."""
|
||||
with patch(
|
||||
"homeassistant.components.vizio.config_flow.VizioAsync.get_unique_id",
|
||||
return_value=UNIQUE_ID,
|
||||
AsyncMock(return_value=UNIQUE_ID),
|
||||
):
|
||||
yield
|
||||
|
||||
|
@ -83,7 +83,7 @@ def vizio_connect_fixture():
|
|||
"""Mock valid vizio device and entry setup."""
|
||||
with patch(
|
||||
"homeassistant.components.vizio.config_flow.VizioAsync.validate_ha_config",
|
||||
return_value=True,
|
||||
AsyncMock(return_value=True),
|
||||
):
|
||||
yield
|
||||
|
||||
|
@ -156,7 +156,7 @@ def vizio_cant_connect_fixture():
|
|||
"""Mock vizio device can't connect with valid auth."""
|
||||
with patch(
|
||||
"homeassistant.components.vizio.config_flow.VizioAsync.validate_ha_config",
|
||||
return_value=False,
|
||||
AsyncMock(return_value=False),
|
||||
):
|
||||
yield
|
||||
|
||||
|
|
Loading…
Reference in New Issue