Bump pyvizio version and add additional device info (#31417)
* bump pyvizio version and add additional device info * add patches for get_model and get_version * change keywrod argument to positional for _test_service
This commit is contained in:
1 parent
744ae82933
commit
ee927fbc9e
7 files changed
+38
-21
No files matched your search
@@ -1,10 +1,9 @@
|
||||
"""Configure py.test."""
|
||||
from asynctest import patch
|
||||
import pytest
|
||||
from pyvizio.const import DEVICE_CLASS_SPEAKER
|
||||
from pyvizio.vizio import MAX_VOLUME
|
||||
from pyvizio.const import DEVICE_CLASS_SPEAKER, MAX_VOLUME
|
||||
|
||||
from .const import CURRENT_INPUT, INPUT_LIST, UNIQUE_ID
|
||||
from .const import CURRENT_INPUT, INPUT_LIST, MODEL, UNIQUE_ID, VERSION
|
||||
|
||||
|
||||
class MockInput:
|
||||
@@ -91,12 +90,18 @@ def vizio_update_fixture():
|
||||
return_value=int(MAX_VOLUME[DEVICE_CLASS_SPEAKER] / 2),
|
||||
), patch(
|
||||
"homeassistant.components.vizio.media_player.VizioAsync.get_current_input",
|
||||
return_value=MockInput(CURRENT_INPUT),
|
||||
return_value=CURRENT_INPUT,
|
||||
), patch(
|
||||
"homeassistant.components.vizio.media_player.VizioAsync.get_inputs",
|
||||
"homeassistant.components.vizio.media_player.VizioAsync.get_inputs_list",
|
||||
return_value=get_mock_inputs(INPUT_LIST),
|
||||
), patch(
|
||||
"homeassistant.components.vizio.media_player.VizioAsync.get_power_state",
|
||||
return_value=True,
|
||||
), patch(
|
||||
"homeassistant.components.vizio.media_player.VizioAsync.get_model",
|
||||
return_value=MODEL,
|
||||
), patch(
|
||||
"homeassistant.components.vizio.media_player.VizioAsync.get_version",
|
||||
return_value=VERSION,
|
||||
):
|
||||
yield
|
||||
Reference in new issue
Block a user