mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-17 16:57:35 +08:00
bugfix: when binding variable is None, it should be None other than raise ParamsError"
This commit is contained in:
@@ -59,7 +59,8 @@ class TestcaseParserUnittest(unittest.TestCase):
|
||||
"var_2": "def",
|
||||
"var_3": 123,
|
||||
"var_4": {"a": 1},
|
||||
"var_5": True
|
||||
"var_5": True,
|
||||
"var_6": None
|
||||
}
|
||||
testcase_parser = testcase.TestcaseParser(variables_binds=variable_binds)
|
||||
self.assertEqual(
|
||||
@@ -106,6 +107,10 @@ class TestcaseParserUnittest(unittest.TestCase):
|
||||
testcase_parser.eval_content_variables("abc$var_4"),
|
||||
"abc{'a': 1}"
|
||||
)
|
||||
self.assertEqual(
|
||||
testcase_parser.eval_content_variables("$var_6"),
|
||||
None
|
||||
)
|
||||
|
||||
def test_eval_content_variables_search_upward(self):
|
||||
testcase_parser = testcase.TestcaseParser()
|
||||
|
||||
Reference in New Issue
Block a user