def test_class_decoration(self):
        def deco(func):
            def _wrapper(*args, **kwargs):
                return True
            return _wrapper

        @method_decorator(deco, name="method")
        class Test(object):
            def method(self):
                return False

        self.assertTrue(Test().method())
@method_decorator can be used to decorate a class and its methods.
dataset/ETHPy150Open django/django/tests/decorators/tests.py/MethodDecoratorTests.test_class_decoration