Пример #1
0
 def test_critical_original_headers_are_filtered(self):
     request = mock.MagicMock(META=dict(HTTP_HOST='originalhost',
                                        HTTP_COOKIE='blah'))
     view = Convert()
     view.request = request
     self.assertEqual(view.request_headers(), {})
 def test_critical_original_headers_are_filtered(self):
     request = mock.MagicMock(META=dict(HTTP_HOST='originalhost',
                                        HTTP_COOKIE='blah'))
     view = Convert()
     view.request = request
     self.assertEqual(view.request_headers(), {})
Пример #3
0
 def test_view_headers_are_reverted_to_originals(self):
     request = mock.MagicMock(META=dict(HTTP_ACCEPT_LANGUAGE='fr'))
     view = Convert()
     view.request = request
     self.assertEqual(view.request_headers(), {'Accept-Language': 'fr'})
 def test_view_headers_are_reverted_to_originals(self):
     request = mock.MagicMock(META=dict(HTTP_ACCEPT_LANGUAGE='fr'))
     view = Convert()
     view.request = request
     self.assertEqual(view.request_headers(), {'Accept-Language': 'fr'})