Skip to content

Commit 94a89c8

Browse files
nogatesclaude
andauthored
Fix undo path parameters being passed with JSON string quotes (#3197)
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 <noreply@anthropic.com>
1 parent 559f515 commit 94a89c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,9 @@ def request_parameter_with_value(context, name, value, path_parameters):
459459
tpl = Template(value).render(**context)
460460
param_name = escape_reserved_keyword(snake_case(name))
461461
context["api_request"]["kwargs"][param_name] = tpl
462-
# Store in path_parameters for undo operations
463-
path_parameters[name] = tpl
464-
path_parameters[param_name] = tpl
462+
# Store in path_parameters for undo operations (deserialize to strip JSON encoding)
463+
path_parameters[name] = json.loads(tpl)
464+
path_parameters[param_name] = json.loads(tpl)
465465

466466

467467
def assert_no_unparsed(data):

0 commit comments

Comments
 (0)