예제 #1
0
def test_urljoin_append_slash():
    url = "http://localhost.com"
    result = join_urlpath(url, "/")
    assert "http://localhost.com/" == result
예제 #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
예제 #3
0
def test_urljoin_accepts_none():
    url = "http://localhost.com/foo"
    result = join_urlpath(url, None)
    assert "http://localhost.com/foo" == result
예제 #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