'If an IPv6 address is used in the C{uri} passed to L{Agent.request},
the computed I{Host} header needs to be bracketed.'

def test_hostIPv6Bracketed(self):

    self.agent._getEndpoint = (lambda *args: self)
    self.agent.request('GET', 'http://[::1]/')
    (req, res) = self.protocol.requests.pop()
    self.assertEqual(req.headers.getRawHeaders('host'), ['[::1]'])
