File: test_ia.py

package info (click to toggle)
python-internetarchive 1.8.1-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 832 kB
  • sloc: python: 4,646; makefile: 180; xml: 180
file content (19 lines) | stat: -rw-r--r-- 541 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from tests.conftest import ia_call


def test_ia(capsys):
    ia_call(['ia', '--help'])
    out, err = capsys.readouterr()
    assert 'A command line interface to Archive.org.' in out

    ia_call(['ia', '--insecure', 'ls', 'nasa'])

    ia_call(['ia', 'nocmd'], expected_exit_code=127)
    out, err = capsys.readouterr()
    assert "error: 'nocmd' is not an ia command!" in err

    ia_call(['ia', 'help'])
    out, err = capsys.readouterr()
    assert 'A command line interface to Archive.org.' in err

    ia_call(['ia', 'help', 'list'])