2
from pypy.translator.js.lib.url import parse_url
5
assert parse_url("path") == (["path"], {})
6
assert parse_url("a/b/c/d") == (["a", "b", "c", "d"], {})
7
assert parse_url("/a/b") == (["a", "b"], {})
8
assert parse_url("/a/b/c/") == (["a", "b", "c"], {})
9
assert parse_url("a/b?q=a&c=z") == (["a","b"], {"q":"a", "c":"z"})
10
got = parse_url('/get_message?sid=2ed&pid=-1')
11
assert got == (["get_message"], {'pid':'-1', 'sid':'2ed'})