From 3deee325a9d3cad4d5d79ecd6b1fcc27a0b909ba Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Thu, 1 Jan 2026 14:03:33 +0100 Subject: [PATCH] Update step_definitions.py --- testing/cucumber/features/steps/step_definitions.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/testing/cucumber/features/steps/step_definitions.py b/testing/cucumber/features/steps/step_definitions.py index ed9bc61d12..f1859a8518 100644 --- a/testing/cucumber/features/steps/step_definitions.py +++ b/testing/cucumber/features/steps/step_definitions.py @@ -15,6 +15,7 @@ import re from PIL import Image, ImageDraw API_HEADERS = {"X-API-KEY": "123456789"} +TIMEOUT = 1 # seconds ######### # GIVEN # @@ -299,7 +300,9 @@ def step_send_get_request(context, endpoint): base_url = "http://localhost:8080" full_url = f"{base_url}{endpoint}" response = requests.get( - full_url, headers=API_HEADERS, timeout=getattr(context, "request_timeout", 60) + full_url, + headers=API_HEADERS, + timeout=getattr(context, "request_timeout", TIMEOUT), ) context.response = response @@ -313,7 +316,7 @@ def step_send_get_request_with_params(context, endpoint): full_url, params=params, headers=API_HEADERS, - timeout=getattr(context, "request_timeout", 60), + timeout=getattr(context, "request_timeout", TIMEOUT), ) context.response = response @@ -348,7 +351,7 @@ def step_send_api_request(context, endpoint): url, files=form_data, headers=API_HEADERS, - timeout=getattr(context, "request_timeout", 60), + timeout=getattr(context, "request_timeout", TIMEOUT), ) context.response = response