MCPcopy
hub / github.com/wkentaro/gdown / test_parse_url

Function test_parse_url

tests/test_parse_url.py:10–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9
10def test_parse_url() -> None:
11 file_id = "0B_NiLAzvehC9R2stRmQyM3ZiVjQ"
12
13 urls = [
14 (
15 f"https://drive.google.com/open?id={file_id}",
16 (file_id, False),
17 ),
18 (
19 f"https://drive.google.com/uc?id={file_id}",
20 (file_id, True),
21 ),
22 (
23 f"https://drive.google.com/file/d/{file_id}/view?usp=sharing",
24 (file_id, False),
25 ),
26 (
27 "https://drive.google.com/a/jsk.imi.i.u-tokyo.ac.jp/uc?id={}&export=download".format( # NOQA
28 file_id
29 ),
30 (file_id, True),
31 ),
32 ]
33
34 for url, expected in urls:
35 assert parse_url(url=url) == expected

Callers

nothing calls this directly

Calls 1

parse_urlFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…