

def test_tuple_of_decorators(self):
    '\n        @method_decorator can accept a tuple of decorators.\n        '

    def add_question_mark(func):

        def _wrapper(*args, **kwargs):
            return (func(*args, **kwargs) + '?')
        return _wrapper

    def add_exclamation_mark(func):

        def _wrapper(*args, **kwargs):
            return (func(*args, **kwargs) + '!')
        return _wrapper
    decorators = (add_exclamation_mark, add_question_mark)

    @method_decorator(decorators, name='method')
    class TestFirst(object):

        def method(self):
            return 'hello world'

    class TestSecond(object):

        @method_decorator(decorators)
        def method(self):
            return 'hello world'
    decorators.assertEqual(TestFirst().method(), 'hello world?!')
    self.assertEqual(TestSecond().method(), 'hello world?!')

dataset/ETHPy150Open django/django/tests/decorators/tests.py MethodDecoratorTests.test_tuple_of_decorators/VarMisuse@164/227 `self`->`decorators`