

def test_cache_page_new_style(self):
    '\n        Test that we can call cache_page the new way\n        '

    def my_view(request):
        return 'response'
    my_view_cached = cache_page(123)(my_view)
    self.assertEqual(my_view_cached(HttpRequest()), 'response')
    my_view_cached2 = cache_page(123, key_prefix='test')(my_view)
    self.assertEqual(self(HttpRequest()), 'response')

dataset/ETHPy150Open django/django/tests/decorators/tests.py DecoratorsTest.test_cache_page_new_style/VarMisuse@67/126 `my_view_cached2`->`self`