TestcaseParser: rename function name, bind_variables => update_binded_variables

This commit is contained in:
httprunner
2017-11-01 16:42:52 +08:00
parent 7edba7be51
commit ed9079c495
2 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ class Context(object):
self.testcase_variables_mapping = copy.deepcopy(self.testset_shared_variables_mapping)
self.testcase_parser.bind_functions(self.testcase_functions_config)
self.testcase_parser.bind_variables(self.testcase_variables_mapping)
self.testcase_parser.update_binded_variables(self.testcase_variables_mapping)
if level == "testset":
self.import_module_items(["ate.built_in"], "testset")
@@ -117,7 +117,7 @@ class Context(object):
self.testset_shared_variables_mapping[variable_name] = variable_evale_value
self.testcase_variables_mapping[variable_name] = variable_evale_value
self.testcase_parser.bind_variables(self.testcase_variables_mapping)
self.testcase_parser.update_binded_variables(self.testcase_variables_mapping)
def __update_context_functions_config(self, level, config_mapping):
"""

View File

@@ -330,11 +330,11 @@ def substitute_variables_with_mapping(content, mapping):
class TestcaseParser(object):
def __init__(self, variables={}, functions={}, file_path=None):
self.bind_variables(variables)
self.update_binded_variables(variables)
self.bind_functions(functions)
self.file_path = file_path
def bind_variables(self, variables):
def update_binded_variables(self, variables):
""" bind variables to current testcase parser
@param (dict) variables, variables binds mapping
{