diff --git a/tempest/common/utils/__init__.py b/tempest/common/utils/__init__.py index 5a86caaee7..aa8186435c 100644 --- a/tempest/common/utils/__init__.py +++ b/tempest/common/utils/__init__.py @@ -78,7 +78,7 @@ def services(*args): decorators.attr(type=list(args))(f) @functools.wraps(f) - def wrapper(self, *func_args, **func_kwargs): + def wrapper(*func_args, **func_kwargs): service_list = get_service_list() for service in args: @@ -86,7 +86,7 @@ def services(*args): msg = 'Skipped because the %s service is not available' % ( service) raise testtools.TestCase.skipException(msg) - return f(self, *func_args, **func_kwargs) + return f(*func_args, **func_kwargs) return wrapper return decorator diff --git a/tempest/lib/decorators.py b/tempest/lib/decorators.py index ef1003b6bc..acbb7be030 100644 --- a/tempest/lib/decorators.py +++ b/tempest/lib/decorators.py @@ -56,9 +56,9 @@ def related_bug(bug, status_code=None): """ def decorator(f): @functools.wraps(f) - def wrapper(self, *func_args, **func_kwargs): + def wrapper(*func_args, **func_kwargs): try: - return f(self, *func_args, **func_kwargs) + return f(*func_args, **func_kwargs) except Exception as exc: exc_status_code = getattr(exc, 'status_code', None) if status_code is None or status_code == exc_status_code: