How to use the aria2p.cli.subcommand_remove function in aria2p

To help you get started, we’ve selected a few aria2p examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pawamoy / aria2p / tests / test_cli.py View on Github external
def test_remove_subcommand():
    with Aria2Server(port=7520, session=SESSIONS_DIR / "dl-aria2-1.34.0-paused.txt") as server:
        assert cli.subcommand_remove(server.api, ["2089b05ecca3d829"]) == 0
github pawamoy / aria2p / tests / test_cli.py View on Github external
def test_remove_subcommand_one_failure(capsys):
    with Aria2Server(port=7521, session=SESSIONS_DIR / "dl-aria2-1.34.0-paused.txt") as server:
        assert cli.subcommand_remove(server.api, ["2089b05ecca3d829", "cca3d8292089b05e"]) == 1
        assert capsys.readouterr().err == "GID cca3d8292089b05e is not found\n"
github pawamoy / aria2p / tests / test_cli.py View on Github external
def test_remove_all_subcommand():
    with Aria2Server(port=7522) as server:
        assert cli.subcommand_remove(server.api, do_all=True) == 0