mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-17 18:37:35 +08:00
fix bug|>update parse_variables and add testcase test_parse_variables_multiple_identical_variables
This commit is contained in:
@@ -188,6 +188,19 @@ class TestcaseParserUnittest(unittest.TestCase):
|
||||
"/users/100/training/1498?userId=100&data=1498"
|
||||
)
|
||||
|
||||
def test_parse_variables_multiple_identical_variables(self):
|
||||
variables_binds = {
|
||||
"user": 100,
|
||||
"userid": 1000,
|
||||
"data": 1498
|
||||
}
|
||||
content = "/users/$user/$userid/$data?userId=$userid&data=$data"
|
||||
self.assertEqual(
|
||||
testcase.parse_content_with_bindings(content, variables_binds, {}),
|
||||
"/users/100/1000/1498?userId=1000&data=1498"
|
||||
)
|
||||
|
||||
|
||||
def test_parse_content_with_bindings_functions(self):
|
||||
import random, string
|
||||
functions_binds = {
|
||||
|
||||
Reference in New Issue
Block a user