From dccfe4aaf1a7f64cf0deb1bfe2727702e3c5a5c9 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Fri, 9 Mar 2018 15:49:37 +0800 Subject: [PATCH] bugfix --- httprunner/__about__.py | 2 +- httprunner/task.py | 2 +- httprunner/utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/httprunner/__about__.py b/httprunner/__about__.py index 9f31a860..e4c3adbf 100644 --- a/httprunner/__about__.py +++ b/httprunner/__about__.py @@ -1,7 +1,7 @@ __title__ = 'HttpRunner' __description__ = 'HTTP test runner, not just about api test and load test.' __url__ = 'https://github.com/HttpRunner/HttpRunner' -__version__ = '1.1.0-beta.1' +__version__ = '1.1.0-beta.2' __author__ = 'debugtalk' __author_email__ = 'mail@debugtalk.com' __license__ = 'MIT' diff --git a/httprunner/task.py b/httprunner/task.py index 18a2dc3d..ca0ee5eb 100644 --- a/httprunner/task.py +++ b/httprunner/task.py @@ -12,7 +12,7 @@ class TestCase(unittest.TestCase): def __init__(self, test_runner, testcase_dict): super(TestCase, self).__init__() self.test_runner = test_runner - self.testcase_dict = testcase_dict + self.testcase_dict = copy.copy(testcase_dict) def runTest(self): """ run testcase and check result. diff --git a/httprunner/utils.py b/httprunner/utils.py index b47e8d46..688dfb41 100644 --- a/httprunner/utils.py +++ b/httprunner/utils.py @@ -331,7 +331,7 @@ def override_variables_binds(variables, new_mapping): """ if isinstance(variables, list): variables_ordered_dict = convert_to_order_dict(variables) - elif isinstance(variables, OrderedDict): + elif isinstance(variables, (OrderedDict, dict)): variables_ordered_dict = variables else: raise exception.ParamsError("variables error!")