mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-16 09:47:35 +08:00
fix a4ce29e656: make variables independent on order
This commit is contained in:
@@ -452,7 +452,7 @@ class TestParser(unittest.TestCase):
|
||||
# self.assertEqual(len(parsed_testcases), 2 * 2)
|
||||
self.assertEqual(parsed_testcases[0]["config"]["name"], '1230')
|
||||
|
||||
def test_parse_tests_fix_override_variables(self):
|
||||
def test_parse_tests_override_variables(self):
|
||||
tests_mapping = {
|
||||
'testcases': [
|
||||
{
|
||||
@@ -479,7 +479,7 @@ class TestParser(unittest.TestCase):
|
||||
parser.parse_tests(tests_mapping)
|
||||
test_dict1_variables = tests_mapping["testcases"][0]["tests"][0]["variables"]
|
||||
self.assertEqual(test_dict1_variables["creator"], "user_test_001")
|
||||
self.assertEqual(test_dict1_variables["username"], "user_test_001")
|
||||
self.assertEqual(test_dict1_variables["username"], "$creator")
|
||||
|
||||
def test_parse_environ(self):
|
||||
os.environ["PROJECT_KEY"] = "ABCDEFGH"
|
||||
|
||||
Reference in New Issue
Block a user