

def test_sameorigin_decorator(self):
    '\n        Ensures @xframe_options_sameorigin properly sets the X-Frame-Options\n        header.\n        '

    @xframe_options_sameorigin
    def a_view(request):
        return HttpResponse()
    r = a_view(HttpRequest())
    self.assertEqual(r['X-Frame-Options'], 'SAMEORIGIN')

dataset/ETHPy150Open django/django/tests/decorators/tests.py XFrameOptionsDecoratorsTests.test_sameorigin_decorator/original