예제 #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'
예제 #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'
예제 #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"
예제 #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"