Esempio n. 1
0
    def test_base(self):
        self.middleware = HostnameMiddleware()
        self.request = HttpRequest()
        self.response = HttpResponse()

        self.middleware.process_response(self.request, self.response)
        self.assertEqual(self.response['X-Backend-Server'], 'foobar.oregon-b')
Esempio n. 2
0
    def test_base(self):
        self.middleware = HostnameMiddleware()
        self.request = HttpRequest()
        self.response = HttpResponse()

        self.middleware.process_response(self.request, self.response)
        self.assertEqual(self.response['X-Backend-Server'],
                         'foobar.bedrock-dev.example.com')