diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2017-03-29 09:08:50 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-03-29 09:08:50 +0000 |
commit | d4d7b5821f6d9a783bed651441b9f73c5cf64cbc (patch) | |
tree | 522d17e73f571e787bb484f35a45d241abd16e7e /utils/test | |
parent | 7c1b8bf89d6ce3ec0114c103e6d62161eb12a071 (diff) | |
parent | f36fc889cfc92f50a4f053661f9ea841e4a5b045 (diff) |
Merge "keep methods' name/docstring after decorator"
Diffstat (limited to 'utils/test')
-rw-r--r-- | utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py | 5 | ||||
-rw-r--r-- | utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py b/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py index 083bf59fc..4c31a6f0f 100644 --- a/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py +++ b/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py @@ -1,3 +1,5 @@ +import functools + from opnfv_testapi.common import constants from opnfv_testapi.resources import handlers import opnfv_testapi.resources.scenario_models as models @@ -158,18 +160,21 @@ class ScenarioGURHandler(GenericScenarioHandler): return data.format() def _iter_installers(xstep): + @functools.wraps(xstep) def magic(self, data): [xstep(self, installer) for installer in self._filter_installers(data.installers)] return magic def _iter_versions(xstep): + @functools.wraps(xstep) def magic(self, installer): [xstep(self, version) for version in (self._filter_versions(installer.versions))] return magic def _iter_projects(xstep): + @functools.wraps(xstep) def magic(self, version): [xstep(self, project) for project in (self._filter_projects(version.projects))] diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py b/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py index 7a6e94a93..a5a4fb30f 100644 --- a/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py +++ b/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py @@ -1,5 +1,6 @@ from copy import deepcopy from datetime import datetime +import functools import json import os @@ -140,6 +141,7 @@ class TestScenarioUpdate(TestScenarioBase): self.scenario = self.create_return_name(self.req_d) def _execute(set_update): + @functools.wraps(set_update) def magic(self): update, scenario = set_update(self, deepcopy(self.req_d)) self._update_and_assert(update, scenario) |