def test_port(self): r = feedparser._convert_to_idn(u'http://%s:8080/' % (self.hostname, )) self.assertEqual(r, u'http://xn--hxajbheg2az3al.xn--jxalpdlp:8080/')
def test_control(self): r = feedparser._convert_to_idn(u'http://example.test/') self.assertEqual(r, u'http://example.test/')
def test_port(self): r = feedparser._convert_to_idn(u'http://%s:8080/' % (self.hostname,)) self.assertEqual(r, u'http://xn--hxajbheg2az3al.xn--jxalpdlp:8080/')
def test_idn(self): r = feedparser._convert_to_idn(u"http://%s/" % (self.hostname,)) self.assertEqual(r, u"http://xn--hxajbheg2az3al.xn--jxalpdlp/")