mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Remove uneeded patch statements in here_travel_time (#72361)
This commit is contained in:
parent
5bb39a1db5
commit
9763b44357
@ -53,7 +53,6 @@ from homeassistant.const import (
|
|||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
import homeassistant.util.dt as dt_util
|
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
API_KEY,
|
API_KEY,
|
||||||
@ -264,9 +263,6 @@ async def test_no_attribution(hass: HomeAssistant):
|
|||||||
|
|
||||||
async def test_entity_ids(hass: HomeAssistant, valid_response: MagicMock):
|
async def test_entity_ids(hass: HomeAssistant, valid_response: MagicMock):
|
||||||
"""Test that origin/destination supplied by entities works."""
|
"""Test that origin/destination supplied by entities works."""
|
||||||
utcnow = dt_util.utcnow()
|
|
||||||
# Patching 'utcnow' to gain more control over the timed update.
|
|
||||||
with patch("homeassistant.util.dt.utcnow", return_value=utcnow):
|
|
||||||
zone_config = {
|
zone_config = {
|
||||||
"zone": [
|
"zone": [
|
||||||
{
|
{
|
||||||
@ -433,9 +429,6 @@ async def test_invalid_origin_entity_state(hass: HomeAssistant, caplog):
|
|||||||
async def test_route_not_found(hass: HomeAssistant, caplog):
|
async def test_route_not_found(hass: HomeAssistant, caplog):
|
||||||
"""Test that route not found error is correctly handled."""
|
"""Test that route not found error is correctly handled."""
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.components.here_travel_time.config_flow.validate_api_key",
|
|
||||||
return_value=None,
|
|
||||||
), patch(
|
|
||||||
"herepy.RoutingApi.public_transport_timetable",
|
"herepy.RoutingApi.public_transport_timetable",
|
||||||
side_effect=NoRouteFoundError,
|
side_effect=NoRouteFoundError,
|
||||||
):
|
):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user