feat: list command fails when --index is used without --json or --html

This commit is contained in:
Cristian 2020-08-19 13:14:04 -05:00 committed by Cristian Vargas
parent 885ff50449
commit a77d6dc235
2 changed files with 12 additions and 1 deletions

View file

@ -32,3 +32,7 @@ def test_list_html_index(process, disable_extractors_dict):
output_html = list_process.stdout.decode("utf-8")
assert "<footer>" in output_html
assert "http://127.0.0.1:8080/static/example.com.html" in output_html
def test_list_index_with_wrong_flags(process):
list_process = subprocess.run(["archivebox", "list", "--index"], capture_output=True)
assert "--index can only be used with --json or --html options." in list_process.stderr.decode("utf-8")