Revert "New encode/decode_path_component functions"

Refs #272

This reverts commit 9fdb47ca95.

Now that ASGI supports raw_path we don't need our own encoding scheme!
This commit is contained in:
Simon Willison 2019-06-18 17:22:26 -07:00
commit 35429f9089
2 changed files with 0 additions and 37 deletions

View file

@ -381,19 +381,3 @@ def test_path_with_format(path, format, extra_qs, expected):
)
def test_format_bytes(bytes, expected):
assert expected == utils.format_bytes(bytes)
@pytest.mark.parametrize(
"name,expected",
[
("table", "table"),
("table/and/slashes", "tableU+002FandU+002Fslashes"),
("~table", "U+007Etable"),
("+bobcats!", "U+002Bbobcats!"),
("U+007Etable", "UU+002B007Etable"),
],
)
def test_encode_decode_path_component(name, expected):
encoded = utils.encode_path_component(name)
assert encoded == expected
assert name == utils.decode_path_component(encoded)