mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
update unittest
This commit is contained in:
@@ -348,13 +348,13 @@ class TestParser(unittest.TestCase):
|
||||
def test_substitute_variables(self):
|
||||
content = {
|
||||
'request': {
|
||||
'url': '/api/users/$uid',
|
||||
'url': '/api/users/$uid?id=$id',
|
||||
'headers': {'token': '$token'}
|
||||
}
|
||||
}
|
||||
variables_mapping = {"$uid": 1000}
|
||||
variables_mapping = {"$uid": 1000, "$id": 2}
|
||||
substituted_data = parser.substitute_variables(content, variables_mapping)
|
||||
self.assertEqual(substituted_data["request"]["url"], "/api/users/1000")
|
||||
self.assertEqual(substituted_data["request"]["url"], "/api/users/1000?id=2")
|
||||
self.assertEqual(substituted_data["request"]["headers"], {'token': '$token'})
|
||||
|
||||
def test_parse_parameters_raw_list(self):
|
||||
|
||||
Reference in New Issue
Block a user