def mock_decorator_with_params(*oargs, **okwargs):
 def inner(fn, *iargs, **ikwargs):
  if hasattr(fn, '__call__'):
   return fn
  else:
   return Mock()
 return inner

def mock_decorator_with_params ( * oargs , ** okwargs ) : def inner ( fn , * iargs , ** ikwargs ) : if hasattr ( fn , '__call__' ) : return fn else : return Mock ( ) return inner
optionally mock a decorator that takes parameters e .