How to use the aria2p.cli.subcommand_resume 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_resume_all_subcommand_doesnt_fail_with_already_active_downloads():
    with Aria2Server(port=7519, session=SESSIONS_DIR / "dl-2-aria2.txt") as server:
        assert cli.subcommand_resume(server.api, do_all=True) == 0
github pawamoy / aria2p / tests / test_cli.py View on Github external
def test_resume_subcommand(capsys):
    with Aria2Server(port=7515, session=SESSIONS_DIR / "dl-aria2-1.34.0-paused.txt") as server:
        assert cli.subcommand_resume(server.api, ["2089b05ecca3d829"]) == 0
github pawamoy / aria2p / tests / test_cli.py View on Github external
def test_resume_subcommand_already_unpaused(capsys):
    with Aria2Server(port=7516, session=SESSIONS_DIR / "dl-2-aria2.txt") as server:
        assert cli.subcommand_resume(server.api, ["2089b05ecca3d829", "cca3d8292089b05e"]) == 1
        assert (
            capsys.readouterr().err
            == "GID#2089b05ecca3d829 cannot be unpaused now\nGID#cca3d8292089b05e cannot be unpaused now\n"
        )
github pawamoy / aria2p / tests / test_cli.py View on Github external
def test_resume_subcommand_one_unpaused(capsys):
    with Aria2Server(port=7517, session=SESSIONS_DIR / "one-active-one-paused.txt") as server:
        assert cli.subcommand_resume(server.api, ["2089b05ecca3d829", "cca3d8292089b05e"]) == 1
        assert capsys.readouterr().err == "GID#2089b05ecca3d829 cannot be unpaused now\n"
github pawamoy / aria2p / tests / test_cli.py View on Github external
def test_resume_all_subcommand():
    with Aria2Server(port=7518) as server:
        assert cli.subcommand_resume(server.api, do_all=True) == 0