aboutsummaryrefslogtreecommitdiffstats
path: root/functest
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-05-16 16:03:10 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-16 16:03:10 +0000
commit1aa8e1bc1f428921e3fbfb8feca4ea4de5d7019e (patch)
tree56f66ff3bc22d76197078fb95fbeede6bf6c74a3 /functest
parent66071d8a3e1eed290aa081cc7cb43eb059eee6bc (diff)
parent0bbb24ff19753eca6f1e86dbf590b329d0b9c88c (diff)
Merge "Assign the wrapped function’s attributes"
Diffstat (limited to 'functest')
-rw-r--r--functest/utils/decorators.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/functest/utils/decorators.py b/functest/utils/decorators.py
index 46ffe35d..bfbdf048 100644
--- a/functest/utils/decorators.py
+++ b/functest/utils/decorators.py
@@ -3,6 +3,7 @@
# pylint: disable=missing-docstring
import errno
+import functools
import os
import urlparse
@@ -41,6 +42,7 @@ def can_dump_request_to_file(method):
else:
return session.request(method=method, url=url, **kwargs)
+ @functools.wraps(method)
def hook(*args, **kwargs):
with mock.patch('requests.api.request', side_effect=patch_request):
return method(*args, **kwargs)