diff --git a/tests/test_cli.py b/tests/test_cli.py index 8d42bc7..d3c3c05 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -122,7 +122,7 @@ def test_multi_ia(capsys, caplog): multi_helper(t, capsys, caplog) -def test_multi_rest(capsys, caplog): +def test_multi_misc_notia(capsys, caplog): tests = [ [{'service': '--source https://web.archive.org/cdx/search/cdx', 'mods': '--limit 10', 'cmd': 'iter', 'rest': 'commoncrawl.org/*'}, {'count': 10, 'linefgrep': 'commoncrawl.org'}], @@ -133,23 +133,29 @@ def test_multi_rest(capsys, caplog): [{'service': '--cc', 'mods': '--limit 10', 'cmd': 'size', 'rest': 'commoncrawl.org/*'}, {'count': 1, 'is_int': True}], - [{'service': '--ia', 'mods': '--limit 10', 'cmd': 'size', 'rest': 'commoncrawl.org/*'}, - {'count': 1, 'is_int': True}], [{'service': '--cc', 'mods': '--limit 10', 'cmd': 'size', 'rest': '--details commoncrawl.org/*'}, {'count': 2}], + + [{'service': '', 'mods': '--limit 10', 'cmd': 'iter', 'rest': 'commoncrawl.org/*'}, + {'exception': ValueError}], + ] + + for t in tests: + multi_helper(t, capsys, caplog) + + +@pytest.mark.skip(reason='needs some ratelimit love XXX') +def test_multi_misc_ia(capsys, caplog): + tests = [ + [{'service': '--ia', 'mods': '--limit 10', 'cmd': 'size', 'rest': 'commoncrawl.org/*'}, + {'count': 1, 'is_int': True}], [{'service': '--ia', 'mods': '--limit 10', 'cmd': 'size', 'rest': '--details commoncrawl.org/*'}, {'count': 2}], [{'service': '--ia', 'mods': '--from 20180101 --to 20180110 --limit 10', 'cmd': 'size', 'rest': '--details commoncrawl.org'}, {'count': 2}], - - [{'service': '', 'mods': '--limit 10', 'cmd': 'iter', 'rest': 'commoncrawl.org/*'}, - {'exception': ValueError}], ] for t in tests: - if t[0]['service'] == '--ia': - # XXX skip - continue multi_helper(t, capsys, caplog)