diff --git a/tests/test_endpoints.py b/tests/test_endpoints.py index 6175961..14637f7 100644 --- a/tests/test_endpoints.py +++ b/tests/test_endpoints.py @@ -170,6 +170,27 @@ async def test_async_trigger_service(async_cached_client: Client) -> None: ) assert isinstance(resp, tuple) +def test_trigger_service_with_response(cached_client: Client) -> None: + """Tests the `POST /api/services//?return_response` endpoint.""" + weather = cached_client.get_domain("weather") + assert weather is not None + changed_states, data = weather.get_forecasts( + entity_id="weather.forecast_home", + type="hourly", + ) + assert data is not None + + +async def test_async_trigger_service_with_response(async_cached_client: Client) -> None: + """Tests the `POST /api/services//?return_response` endpoint.""" + weather = await async_cached_client.async_get_domain("weather") + assert weather is not None + changed_states, data = await weather.get_forecasts( + entity_id="weather.forecast_home", + type="hourly", + ) + assert data is not None + def test_get_states(cached_client: Client) -> None: """Tests the `GET /api/states` endpoint."""