'After L{client.HTTPDownloader.deferred} fires, the
L{client.HTTPDownloader} instance\'s C{status} and C{response_headers}
attributes are populated with the values from the response.'

def test_downloadHeaders(self):

    def checkHeaders(factory):
        self.assertEqual(factory.status, '200')
        self.assertEqual(factory.response_headers['content-type'][0], 'text/html')
        self.assertEqual(factory.response_headers['content-length'][0], '10')
        os.unlink(factory.fileName)
    factory = client._makeGetterFactory(self.getURL('file'), client.HTTPDownloader, fileOrName=self.mktemp())
    return factory.deferred.addCallback((lambda _: checkHeaders(factory)))
