mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
PS4 bump to renamed dependency (#27144)
* Change to renamed dependency pyps4-2ndscreen 0.9.0 * Rename / bump to ps4 dependency to 1.0.0 * update requirements * Rename test req * Fix import * Bump 1.0.1 * Fix flaky test leaving files behind
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""Tests for the PS4 media player platform."""
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from pyps4_homeassistant.credential import get_ddp_message
|
||||
from pyps4_2ndscreen.credential import get_ddp_message
|
||||
|
||||
from homeassistant.components import ps4
|
||||
from homeassistant.components.media_player.const import (
|
||||
@@ -295,9 +295,7 @@ async def test_media_attributes_are_loaded(hass):
|
||||
async def test_device_info_is_set_from_status_correctly(hass):
|
||||
"""Test that device info is set correctly from status update."""
|
||||
mock_d_registry = mock_device_registry(hass)
|
||||
with patch(
|
||||
"pyps4_homeassistant.ps4.get_status", return_value=MOCK_STATUS_OFF
|
||||
), patch(MOCK_SAVE, side_effect=MagicMock()):
|
||||
with patch("pyps4_2ndscreen.ps4.get_status", return_value=MOCK_STATUS_OFF):
|
||||
mock_entity_id = await setup_mock_component(hass)
|
||||
|
||||
await hass.async_block_till_done()
|
||||
@@ -447,9 +445,9 @@ async def test_media_stop(hass):
|
||||
async def test_select_source(hass):
|
||||
"""Test that select source service calls function with title."""
|
||||
mock_data = {MOCK_TITLE_ID: MOCK_GAMES_DATA}
|
||||
with patch(
|
||||
"pyps4_homeassistant.ps4.get_status", return_value=MOCK_STATUS_IDLE
|
||||
), patch(MOCK_LOAD, return_value=mock_data):
|
||||
with patch("pyps4_2ndscreen.ps4.get_status", return_value=MOCK_STATUS_IDLE), patch(
|
||||
MOCK_LOAD, return_value=mock_data
|
||||
):
|
||||
mock_entity_id = await setup_mock_component(hass)
|
||||
|
||||
mock_func = "{}{}".format(
|
||||
@@ -473,9 +471,9 @@ async def test_select_source(hass):
|
||||
async def test_select_source_caps(hass):
|
||||
"""Test that select source service calls function with upper case title."""
|
||||
mock_data = {MOCK_TITLE_ID: MOCK_GAMES_DATA}
|
||||
with patch(
|
||||
"pyps4_homeassistant.ps4.get_status", return_value=MOCK_STATUS_IDLE
|
||||
), patch(MOCK_LOAD, return_value=mock_data):
|
||||
with patch("pyps4_2ndscreen.ps4.get_status", return_value=MOCK_STATUS_IDLE), patch(
|
||||
MOCK_LOAD, return_value=mock_data
|
||||
):
|
||||
mock_entity_id = await setup_mock_component(hass)
|
||||
|
||||
mock_func = "{}{}".format(
|
||||
@@ -502,9 +500,9 @@ async def test_select_source_caps(hass):
|
||||
async def test_select_source_id(hass):
|
||||
"""Test that select source service calls function with Title ID."""
|
||||
mock_data = {MOCK_TITLE_ID: MOCK_GAMES_DATA}
|
||||
with patch(
|
||||
"pyps4_homeassistant.ps4.get_status", return_value=MOCK_STATUS_IDLE
|
||||
), patch(MOCK_LOAD, return_value=mock_data):
|
||||
with patch("pyps4_2ndscreen.ps4.get_status", return_value=MOCK_STATUS_IDLE), patch(
|
||||
MOCK_LOAD, return_value=mock_data
|
||||
):
|
||||
mock_entity_id = await setup_mock_component(hass)
|
||||
|
||||
mock_func = "{}{}".format(
|
||||
|
||||
Reference in New Issue
Block a user