def test_encode(): assert encode(u'http://exämple.com') == 'http://xn--exmple-cua.com' assert encode(u'http://müller.de/') == 'http://xn--mller-kva.de/' assert encode(u'http://ジェーピーニック.jp/') == 'http://xn--hckqz9bzb1cyrb.jp/' assert encode(u'http://пример.рф') == 'http://xn--e1afmkfd.xn--p1ai' assert encode(u'пример.рф') == 'xn--e1afmkfd.xn--p1ai' assert encode(u'http://exämple.com/mühüü') == 'http://xn--exmple-cua.com/m%C3%BCh%C3%BC%C3%BC' assert encode(u'http://example.com/?x=mühüü') == 'http://example.com/?x=m%C3%BCh%C3%BC%C3%BC'
def test_encode(): assert encode(u'http://exämple.com') == 'http://xn--exmple-cua.com' assert encode(u'http://müller.de/') == 'http://xn--mller-kva.de/' assert encode(u'http://ジェーピーニック.jp/') == 'http://xn--hckqz9bzb1cyrb.jp/' assert encode(u'http://пример.рф') == 'http://xn--e1afmkfd.xn--p1ai' assert encode(u'пример.рф') == 'xn--e1afmkfd.xn--p1ai' assert encode(u'http://exämple.com/mühüü' ) == 'http://xn--exmple-cua.com/m%C3%BCh%C3%BC%C3%BC' assert encode(u'http://example.com/?x=mühüü' ) == 'http://example.com/?x=m%C3%BCh%C3%BC%C3%BC'
def test_encode(): assert encode("http://exämple.com") == "http://xn--exmple-cua.com" assert encode("http://müller.de/") == "http://xn--mller-kva.de/" assert encode("http://ジェーピーニック.jp/") == "http://xn--hckqz9bzb1cyrb.jp/" assert encode("http://пример.рф") == "http://xn--e1afmkfd.xn--p1ai" assert encode("пример.рф") == "xn--e1afmkfd.xn--p1ai"