예제 #1
0
def test_fix_reference_url_substitute_tilde():
    url_string = 'www.example.com/\u223c'
    result = utils.fix_reference_url(url_string)
    expected = 'http://www.example.com/~'

    assert expected == result
예제 #2
0
def test_fix_reference_url_add_http():
    url_string = 'www.example.com/'
    result = utils.fix_reference_url(url_string)
    expected = 'http://www.example.com/'

    assert expected == result
예제 #3
0
def test_fix_reference_url_change_bars_with_slashes():
    url_string = 'http:||www.example.com|'
    result = utils.fix_reference_url(url_string)
    expected = 'http://www.example.com/'

    assert expected == result