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