summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/tests/unit
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-03-28 14:30:49 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-03-28 14:30:49 +0800
commit2e08872902f752addff5c6755d698b4fbb022a7c (patch)
tree62b3c05ac35b7df9a8dcd932e76493cde14a80e0 /testapi/opnfv_testapi/tests/unit
parent3bda241da0264a6a46cbda51f61931dd4299db20 (diff)
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 <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit')
-rw-r--r--testapi/opnfv_testapi/tests/unit/test_scenario.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/test_scenario.py b/testapi/opnfv_testapi/tests/unit/test_scenario.py
index 7a6e94a..a5a4fb3 100644
--- a/testapi/opnfv_testapi/tests/unit/test_scenario.py
+++ b/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)