'L{URL.asURI} produces an URI which converts any URI unicode encoding
into pure US-ASCII and returns a new L{URL}.'

def test_asURI(self):

    unicodey = u'http://\xe9.com/e\u0301?a\u0301=i\u0301#u\u0301'
    iri = URL.fromText(unicodey)
    uri = iri.asURI()
    self.assertEqual(iri.host, u'\xe9.com')
    self.assertEqual(iri.path[0], u'e\u0301')
    self.assertEqual(iri.asText(), unicodey)
    expectedURI = u'http://xn--9ca.com/%C3%A9?%C3%A1=%C3%AD#%C3%BA'
    actualURI = uri.asText()
    self.assertEqual(actualURI, expectedURI, (u'%r    !=    %r' % (actualURI, expectedURI)))
