Ejemplo n.º 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'
Ejemplo n.º 2
0
def uri5e():
    'Handle links relative to root'
    assert str(relative_uri('pages/', 'https://apt.traxtech.com')) == \
        'https://apt.traxtech.com/pages/'
Ejemplo n.º 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'
Ejemplo n.º 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'
Ejemplo n.º 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'
Ejemplo n.º 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'
Ejemplo n.º 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'