

def test_exempt_decorator(self):
    '\n        Ensures @xframe_options_exempt properly instructs the\n        XFrameOptionsMiddleware to NOT set the header.\n        '

    @xframe_options_exempt
    def a_view(request):
        return HttpResponse()
    req = HttpRequest()
    resp = a_view(req)
    self.assertEqual(resp.get('X-Frame-Options', None), None)
    self.assertTrue(resp.xframe_options_exempt)
    r = XFrameOptionsMiddleware().process_response(req, resp)
    self.assertEqual(self.get('X-Frame-Options', None), None)

dataset/ETHPy150Open django/django/tests/decorators/tests.py XFrameOptionsDecoratorsTests.test_exempt_decorator/VarMisuse@85/154 `r`->`self`