1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Fix py38 tests (#34658)

This commit is contained in:
Paulus Schoutsen
2020-04-24 15:09:45 -07:00
committed by GitHub
parent 40d3d64027
commit 9a4a83cb91
7 changed files with 92 additions and 124 deletions

View File

@@ -1,6 +1,5 @@
"""Define tests for the PlayStation 4 config flow."""
from unittest.mock import patch
from asynctest import patch
from pyps4_2ndscreen.errors import CredentialTimeout
from homeassistant import data_entry_flow
@@ -21,7 +20,7 @@ from homeassistant.const import (
)
from homeassistant.util import location
from tests.common import MockConfigEntry, mock_coro
from tests.common import MockConfigEntry
MOCK_TITLE = "PlayStation 4"
MOCK_CODE = 12345678
@@ -313,7 +312,7 @@ async def test_0_pin(hass):
"pyps4_2ndscreen.Helper.has_devices", return_value=[{"host-ip": MOCK_HOST}]
), patch(
"homeassistant.components.ps4.config_flow.location.async_detect_location_info",
return_value=mock_coro(MOCK_LOCATION),
return_value=MOCK_LOCATION,
):
result = await hass.config_entries.flow.async_configure(
result["flow_id"], MOCK_AUTO