From 80aea08900c6486e05401cee308d7fa2628d8fd7 Mon Sep 17 00:00:00 2001 From: David Tapiador Date: Wed, 18 Feb 2026 12:09:04 +0100 Subject: [PATCH] Fix undo path parameters being passed with JSON string quotes The `request_parameter_with_value` step stored raw JSON-encoded values (e.g., `"uuid"` with quotes) into `path_parameters`. When undo operations used these values, the quotes got URL-encoded as `%22`, causing VCR cassette path mismatches. Deserialize with `json.loads()` before storing to match how `request_parameter` already handles this correctly. Co-Authored-By: Claude Opus 4.6 --- tests/conftest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 8978fecab2..5a67143b4b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -459,9 +459,9 @@ def request_parameter_with_value(context, name, value, path_parameters): tpl = Template(value).render(**context) param_name = escape_reserved_keyword(snake_case(name)) context["api_request"]["kwargs"][param_name] = tpl - # Store in path_parameters for undo operations - path_parameters[name] = tpl - path_parameters[param_name] = tpl + # Store in path_parameters for undo operations (deserialize to strip JSON encoding) + path_parameters[name] = json.loads(tpl) + path_parameters[param_name] = json.loads(tpl) def assert_no_unparsed(data):