'L{ProxyClientFactory.buildProtocol} should produce a L{ProxyClient}
with the same values of attributes (with updates on the headers).'

def test_buildProtocol(self):

    factory = ProxyClientFactory('GET', '/foo', 'HTTP/1.0', {'accept': 'text/html'}, 'Some    data', None)
    proto = factory.buildProtocol(None)
    self.assertIsInstance(proto, ProxyClient)
    self.assertEqual(proto.command, 'GET')
    self.assertEqual(proto.rest, '/foo')
    self.assertEqual(proto.data, 'Some    data')
    self.assertEqual(proto.headers, {'accept': 'text/html', 'connection': 'close'})
