Beispiel #1
0
def test_urljoin_append_slash():
    url = "http://localhost.com"
    result = join_urlpath(url, "/")
    assert "http://localhost.com/" == result
Beispiel #2
0
def test_urljoin_avoids_double_slashes():
    url = "http://localhost.com/foo/"
    result = join_urlpath(url, "/bar")
    assert "http://localhost.com/foo/bar" == result
Beispiel #3
0
def test_urljoin_accepts_none():
    url = "http://localhost.com/foo"
    result = join_urlpath(url, None)
    assert "http://localhost.com/foo" == result
Beispiel #4
0
def test_urljoin_joins_two_paths():
    url = "http://localhost.com/foo"
    result = join_urlpath(url, "/bar")
    assert "http://localhost.com/foo/bar" == result