Simplify vizio unique ID check since only IP and device class are needed (#37692)
This commit is contained in:
1 parent
444df4a7d2
commit
fbf44b37a9
8 files changed
+88
-140
No files matched your search
@@ -47,15 +47,32 @@ def skip_notifications_fixture():
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture(name="vizio_get_unique_id", autouse=True)
|
||||
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,
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture(name="vizio_no_unique_id")
|
||||
def vizio_no_unique_id_fixture():
|
||||
"""Mock no vizio unique ID returrned."""
|
||||
with patch(
|
||||
"homeassistant.components.vizio.config_flow.VizioAsync.get_unique_id",
|
||||
return_value=None,
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture(name="vizio_connect")
|
||||
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,
|
||||
), patch(
|
||||
"homeassistant.components.vizio.config_flow.VizioAsync.get_unique_id",
|
||||
return_value=UNIQUE_ID,
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
Reference in new issue
Block a user