From f36fc889cfc92f50a4f053661f9ea841e4a5b045 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Tue, 28 Mar 2017 14:30:49 +0800 Subject: keep methods' name/docstring after decorator applying functools.wraps() to keep the name and docstring of the original function which is decorated Change-Id: Id612039921566dd48f8d8797abe30f23aaf99301 Signed-off-by: SerenaFeng --- utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py') 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) -- cgit 1.2.3-korg