More features

This commit is contained in:
Fang-Pen Lin
2025-11-07 09:18:54 -08:00
parent 8c2e1379fe
commit a1835c0624
2 changed files with 39 additions and 0 deletions
+7
View File
@@ -232,6 +232,13 @@ def step_impl(context: Context, var_path: str, jq_query: str, regex: str):
)
@then("the value {var_path} should be equal to json")
def step_impl(context: Context, var_path: str):
value = eval_var(context, var_path)
expected_value = json.loads(context.text)
assert value == expected_value, f"{value!r} does not match {expected_value!r}"
@then("the value {var_path} should be equal to {expected}")
def step_impl(context: Context, var_path: str, expected: str):
value = eval_var(context, var_path)