'L{redirectTo} will set the C{Location} and C{Content-Type} headers on
its request, and set the response code to C{FOUND}, so the browser will
be redirected.'

def test_headersAndCode(self):

    request = Request(DummyChannel(), True)
    request.method = 'GET'
    targetURL = 'http://target.example.com/4321'
    redirectTo(targetURL, request)
    self.assertEqual(request.code, FOUND)
    self.assertEqual(request.responseHeaders.getRawHeaders('location'), [targetURL])
    self.assertEqual(request.responseHeaders.getRawHeaders('content-type'), ['text/html;    charset=utf-8'])
