'Tests that the X_FRAME_OPTIONS setting can be set to SAMEORIGIN to
have the middleware use that value for the HTTP header.'

def test_same_origin(self):

    with override_settings(X_FRAME_OPTIONS=u'SAMEORIGIN'):
        r = XFrameOptionsMiddleware().process_response(HttpRequest(), HttpResponse())
        self.assertEqual(r[u'X-Frame-Options'], u'SAMEORIGIN')
    with override_settings(X_FRAME_OPTIONS=u'sameorigin'):
        r = XFrameOptionsMiddleware().process_response(HttpRequest(), HttpResponse())
        self.assertEqual(r[u'X-Frame-Options'], u'SAMEORIGIN')
