From bd43bdb33579581770c3f1b44b89606b7be385ca Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Fri, 29 Sep 2023 14:03:01 +0000 Subject: [PATCH] test(service): breakout raw api calls with ids --- tests/test_graphql/test_services.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_graphql/test_services.py b/tests/test_graphql/test_services.py index 85090cf..c9b909b 100644 --- a/tests/test_graphql/test_services.py +++ b/tests/test_graphql/test_services.py @@ -63,22 +63,30 @@ allServices { def api_start(client, service: Service) -> dict: + return api_start_by_name(client, service.get_id()) + + +def api_start_by_name(client, service_id: str) -> dict: response = client.post( "/graphql", json={ "query": API_START_MUTATION, - "variables": {"service_id": service.get_id()}, + "variables": {"service_id": service_id}, }, ) return response def api_stop(client, service: Service) -> dict: + return api_stop_by_name(client, service.get_id()) + + +def api_stop_by_name(client, service_id: str) -> dict: response = client.post( "/graphql", json={ "query": API_STOP_MUTATION, - "variables": {"service_id": service.get_id()}, + "variables": {"service_id": service_id}, }, ) return response