Skip to content

Commit 38397a7

Browse files
dakodakovddakov
andauthored
vdk-control-cli: bump werkzeug version (#3451)
bump werkzeug version --------- Signed-off-by: Dako Dakov <ddakov@vmware.com> Co-authored-by: ddakov <ddakov@vmware.com>
1 parent 633447d commit 38397a7

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

projects/vdk-control-cli/.gitlab-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222

2323

2424
# Run in different environments
25-
# VDK Control CLI currently supports Python 3.7, 3.8, 3.9, 3.10 and 3.11
26-
# We only test on 3.7 and 3.11 to reduce the load on the CICD
27-
vdk-control-cli-build-with-py37:
28-
image: "python:3.7"
25+
# VDK Control CLI currently supports Python 3.8, 3.9, 3.10, 3.11 and 3.12
26+
# We only test on 3.9, 3.11 and 3.12 to reduce the load on the CICD
27+
vdk-control-cli-build-with-py39:
28+
image: "python:3.9"
2929
extends: .vdk-control-cli-build
3030

3131
vdk-control-cli-build-with-py311:

projects/vdk-control-cli/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ urllib3>=1.26.5
2828
vdk-control-api-auth
2929

3030
vdk-control-service-api==1.0.13
31-
werkzeug<=2.3.8
31+
werkzeug==3.1.3

projects/vdk-control-cli/tests/vdk/internal/control/command_groups/job/test_list.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from json import JSONDecodeError
55
from typing import Any
66
from typing import List
7+
from urllib.parse import parse_qs
78

8-
import werkzeug
99
from click.testing import CliRunner
1010
from py._path.local import LocalPath
1111
from pytest_httpserver.httpserver import QueryMatcher
@@ -268,9 +268,17 @@ def __init__(self, substring: str):
268268
self.__substring = substring
269269

270270
def get_comparing_values(self, request_query_string: bytes) -> tuple:
271-
query_string = werkzeug.urls.url_decode(request_query_string)
271+
# Decode bytes to string if needed
272+
if isinstance(request_query_string, bytes):
273+
query_string_str = request_query_string.decode("utf-8")
274+
else:
275+
query_string_str = request_query_string
272276

273-
return self.__substring in str(query_string), True
277+
# Parse the query string
278+
parsed_query = parse_qs(query_string_str)
279+
280+
# Convert to string to check substring (similar to original implementation)
281+
return self.__substring in str(parsed_query), True
274282

275283
httpserver.expect_request(
276284
uri="/data-jobs/for-team/test-team/jobs",

0 commit comments

Comments
 (0)