@@ -499,6 +499,17 @@ def test_trigger_service(cached_client: Client) -> None:
499499 logger .info (resp )
500500 assert isinstance (resp , tuple )
501501
502+ def test_call_service (cached_client : Client ) -> None :
503+ """Tests the `POST /api/services/<domain>/<service>` endpoint."""
504+ notify = cached_client .get_domain ("notify" )
505+ assert notify is not None
506+ resp = notify .persistent_notification (
507+ message = "Your API Test Suite just said hello!" ,
508+ title = "Test Suite Notifcation" ,
509+ )
510+ logger .info (resp )
511+ assert isinstance (resp , tuple )
512+
502513
503514async def test_async_trigger_service (async_cached_client : AsyncClient ) -> None :
504515 """Tests the `POST /api/services/<domain>/<service>` endpoint."""
@@ -511,6 +522,17 @@ async def test_async_trigger_service(async_cached_client: AsyncClient) -> None:
511522 assert isinstance (resp , tuple )
512523
513524
525+ async def test_async_call_service (async_cached_client : AsyncClient ) -> None :
526+ """Tests the `POST /api/services/<domain>/<service>` endpoint."""
527+ notify = await async_cached_client .get_domain ("notify" )
528+ assert notify is not None
529+ resp = await notify .persistent_notification (
530+ message = "Your API Test Suite just said hello!" ,
531+ title = "Test Suite Notifcation (Async)" ,
532+ )
533+ assert isinstance (resp , tuple )
534+
535+
514536def test_websocket_trigger_service (websocket_client : WebsocketClient ) -> None :
515537 """Tests the `"type": "trigger_service"` websocket command."""
516538 notify = websocket_client .get_domain ("notify" )
0 commit comments