Ejemplo n.º 1
0
def test_quote():
    assert url.quote("foo") == "foo"
    assert url.quote("foo bar") == "foo%20bar"
    assert url.quote(surrogates) == surrogates_quoted
Ejemplo n.º 2
0
 def path_components(self, components):
     components = map(lambda x: url.quote(x, safe=""), components)
     path = "/" + "/".join(components)
     _, _, _, params, query, fragment = urllib.parse.urlparse(self.url)
     self.path = urllib.parse.urlunparse(
         ["", "", path, params, query, fragment])
Ejemplo n.º 3
0
def test_quote():
    assert url.quote("foo") == "foo"
    assert url.quote("foo bar") == "foo%20bar"
    assert url.quote(surrogates) == surrogates_quoted