MCPcopy
hub / github.com/scdl-org/scdl / call_scdl_with_auth

Function call_scdl_with_auth

tests/utils.py:12–24  ·  view source on GitHub ↗
(
    *args: str,
    encoding: Optional[str] = "utf-8",
)

Source from the content-addressed store, hash-verified

10
11
12def call_scdl_with_auth(
13 *args: str,
14 encoding: Optional[str] = "utf-8",
15) -> subprocess.CompletedProcess:
16 auth_token = os.getenv("AUTH_TOKEN", "")
17 args = ("scdl", *args, f"--auth-token={auth_token}", f"--client-id={client_id}")
18 return subprocess.run(
19 args,
20 capture_output=True,
21 encoding=encoding,
22 errors="ignore" if encoding is not None else None,
23 check=False,
24 )
25
26
27def assert_track(

Callers 15

test_allFunction · 0.90
test_tracksFunction · 0.90
test_likesFunction · 0.90
test_commentedFunction · 0.90
test_playlistsFunction · 0.90
test_repostsFunction · 0.90
test_playlistFunction · 0.90
test_offsetFunction · 0.90
test_no_playlist_folderFunction · 0.90
test_no_strict_playlistFunction · 0.90
test_strict_playlistFunction · 0.90
test_syncFunction · 0.90

Calls 1

runMethod · 0.45

Tested by 15

test_allFunction · 0.72
test_tracksFunction · 0.72
test_likesFunction · 0.72
test_commentedFunction · 0.72
test_playlistsFunction · 0.72
test_repostsFunction · 0.72
test_playlistFunction · 0.72
test_offsetFunction · 0.72
test_no_playlist_folderFunction · 0.72
test_no_strict_playlistFunction · 0.72
test_strict_playlistFunction · 0.72
test_syncFunction · 0.72