mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add support for v6 features to philips js integration (#46422)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Standard setup for tests."""
|
||||
from unittest.mock import Mock, patch
|
||||
from unittest.mock import create_autospec, patch
|
||||
|
||||
from haphilipsjs import PhilipsTV
|
||||
from pytest import fixture
|
||||
|
||||
from homeassistant import setup
|
||||
@@ -20,10 +21,18 @@ async def setup_notification(hass):
|
||||
@fixture(autouse=True)
|
||||
def mock_tv():
|
||||
"""Disable component actual use."""
|
||||
tv = Mock(autospec="philips_js.PhilipsTV")
|
||||
tv = create_autospec(PhilipsTV)
|
||||
tv.sources = {}
|
||||
tv.channels = {}
|
||||
tv.application = None
|
||||
tv.applications = {}
|
||||
tv.system = MOCK_SYSTEM
|
||||
tv.api_version = 1
|
||||
tv.api_version_detected = None
|
||||
tv.on = True
|
||||
tv.notify_change_supported = False
|
||||
tv.pairing_type = None
|
||||
tv.powerstate = None
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.philips_js.config_flow.PhilipsTV", return_value=tv
|
||||
|
||||
Reference in New Issue
Block a user