Ejemplo n.º 1
0
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'
Ejemplo n.º 2
0
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'
Ejemplo n.º 3
0
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"
Ejemplo n.º 4
0
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"