From 73820276327c0f34a319f1a3774a1580da50474e Mon Sep 17 00:00:00 2001 From: httprunner Date: Mon, 3 Dec 2018 12:46:00 +0800 Subject: [PATCH] fix: request url has variable extracted from former api --- httprunner/parser.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/httprunner/parser.py b/httprunner/parser.py index c2001cb3..d835f94a 100644 --- a/httprunner/parser.py +++ b/httprunner/parser.py @@ -815,10 +815,6 @@ def __parse_tests(tests, config, project_mapping): test_dict["variables"], functions ) - test_dict["request"]["url"] = utils.build_url( - base_url, - request_url - ) except exceptions.VariableNotFound: """ variable in current url maybe extracted from former api "tests": [ @@ -835,7 +831,12 @@ def __parse_tests(tests, config, project_mapping): } ] """ - pass + request_url = test_dict["request"]["url"] + finally: + test_dict["request"]["url"] = utils.build_url( + base_url, + request_url + ) def _parse_testcase(testcase, project_mapping):