Beispiel #1
0
def test_uri5g():
    'relative links up one with slash'
    uri = relative_uri('../foo/bar', 'http://www.traxtech.com/bang/bam/')
    assert str(uri) == 'http://www.traxtech.com/bang/foo/bar'
Beispiel #2
0
def uri5e():
    'Handle links relative to root'
    assert str(relative_uri('pages/', 'https://apt.traxtech.com')) == \
        'https://apt.traxtech.com/pages/'
Beispiel #3
0
def test_uri5f():
    'relative links up one'
    uri = relative_uri('../foo/bar', 'http://www.traxtech.com/bang/bam')
    assert str(uri) == 'http://www.traxtech.com/foo/bar'
Beispiel #4
0
def test_uri5d():
    'relative link without trailing slash and dog'
    uri = relative_uri('./foo/bar', 'http://www.traxtech.com/bang')
    assert str(uri) == 'http://www.traxtech.com/foo/bar'
Beispiel #5
0
def test_uri5b():
    'relative link - relative from root'
    uri = relative_uri('/foo/bar', 'http://www.traxtech.com/bang/')
    assert str(uri) == 'http://www.traxtech.com/foo/bar'
Beispiel #6
0
def test_uri5a():
    'relative link with trailing slah on base'
    uri = relative_uri('foo/bar', 'http://www.traxtech.com/bang/')
    assert str(uri) == 'http://www.traxtech.com/bang/foo/bar'
Beispiel #7
0
def test_uri5():
    'relative link w/o trailing slash on base'
    uri = relative_uri('foo/bar', 'http://www.traxtech.com/bang')
    assert str(uri) == 'http://www.traxtech.com/foo/bar'