diff --git a/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_functions_test.py b/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_functions_test.py index d80c6841..a6ca7246 100644 --- a/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_functions_test.py +++ b/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_functions_test.py @@ -57,7 +57,7 @@ class TestCaseRequestWithFunctions(HttpRunner): .assert_equal("status_code", 200) .assert_equal( "body.data", - "This is expected to be sent back as part of response body: bar12-$expect_foo2-bar21.", + "This is expected to be sent back as part of response body: bar12-$expect_foo2-bar32.", ) .assert_type_match("body.json", "None") .assert_type_match("body.json", "NoneType") diff --git a/examples/postman_echo/request_methods/request_with_functions.yml b/examples/postman_echo/request_methods/request_with_functions.yml index 36ab12b5..98007e79 100644 --- a/examples/postman_echo/request_methods/request_with_functions.yml +++ b/examples/postman_echo/request_methods/request_with_functions.yml @@ -47,7 +47,7 @@ teststeps: data: "This is expected to be sent back as part of response body: $foo1-$foo2-$foo3." validate: - eq: ["status_code", 200] - - eq: ["body.data", "This is expected to be sent back as part of response body: bar12-$expect_foo2-bar21."] + - eq: ["body.data", "This is expected to be sent back as part of response body: bar12-$expect_foo2-bar32."] - type_match: ["body.json", None] - type_match: ["body.json", NoneType] - type_match: ["body.json", null] diff --git a/examples/postman_echo/request_methods/request_with_functions_test.py b/examples/postman_echo/request_methods/request_with_functions_test.py index 6ab4cca9..9c71f8e7 100644 --- a/examples/postman_echo/request_methods/request_with_functions_test.py +++ b/examples/postman_echo/request_methods/request_with_functions_test.py @@ -57,7 +57,7 @@ class TestCaseRequestWithFunctions(HttpRunner): .assert_equal("status_code", 200) .assert_equal( "body.data", - "This is expected to be sent back as part of response body: bar12-$expect_foo2-bar21.", + "This is expected to be sent back as part of response body: bar12-$expect_foo2-bar32.", ) .assert_type_match("body.json", "None") .assert_type_match("body.json", "NoneType") diff --git a/examples/postman_echo/request_methods/request_with_variables.yml b/examples/postman_echo/request_methods/request_with_variables.yml index 14196a5f..34c84778 100644 --- a/examples/postman_echo/request_methods/request_with_variables.yml +++ b/examples/postman_echo/request_methods/request_with_variables.yml @@ -38,7 +38,7 @@ teststeps: data: "This is expected to be sent back as part of response body: $foo1-$foo2-$foo3." validate: - eq: ["status_code", 200] - - eq: ["body.data", "This is expected to be sent back as part of response body: bar12-testcase_config_bar2-bar21."] + - eq: ["body.data", "This is expected to be sent back as part of response body: bar12-testcase_config_bar2-bar32."] - name: post form data variables: diff --git a/examples/postman_echo/request_methods/request_with_variables_test.py b/examples/postman_echo/request_methods/request_with_variables_test.py index 63a82d74..d3e7f954 100644 --- a/examples/postman_echo/request_methods/request_with_variables_test.py +++ b/examples/postman_echo/request_methods/request_with_variables_test.py @@ -42,7 +42,7 @@ class TestCaseRequestWithVariables(HttpRunner): .assert_equal("status_code", 200) .assert_equal( "body.data", - "This is expected to be sent back as part of response body: bar12-testcase_config_bar2-bar21.", + "This is expected to be sent back as part of response body: bar12-testcase_config_bar2-bar32.", ) ), Step( diff --git a/httprunner/runner.py b/httprunner/runner.py index edcfaae5..00a46f53 100644 --- a/httprunner/runner.py +++ b/httprunner/runner.py @@ -361,7 +361,7 @@ class HttpRunner(object): # save extracted variables to session variables extracted_variables.update(extract_mapping) - self.__session_variables.update(extract_mapping) + self.__session_variables.update(extracted_variables) self.__duration = time.time() - self.__start_at return self