'L{Agent._getEndpoint} when given a non-ASCII decodable URI will raise a
L{ValueError} saying such.'

def test_nonDecodableURI(self):

    uri = URI.fromBytes('http://example.com:80')
    uri.host = u'\u2603.com'.encode('utf8')
    with self.assertRaises(ValueError) as e:
        self.agent._getEndpoint(uri)
    self.assertEqual(e.exception.args[0], 'The    host    of    the    provided    URI    ({reprout})    contains    non-ASCII    octets,    it    should    be    ASCII    decodable.'.format(reprout=repr(uri.host)))
