You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
472 B
19 lines
472 B
import pytest
|
|
from backupill.cli import main
|
|
from click.testing import CliRunner
|
|
|
|
|
|
def test_nothing_found():
|
|
runner = CliRunner()
|
|
result = runner.invoke(main, [""])
|
|
|
|
assert result.exit_code == 0
|
|
assert "Usage: packupill FILENAME.asc" in result.output
|
|
|
|
|
|
def test_nothing_file():
|
|
runner = CliRunner()
|
|
result = runner.invoke(main, ["FILENAME.asc"])
|
|
|
|
assert result.exit_code == 0
|
|
assert "Error: File 'FILENAME.asc' not found!" in result.output
|
|
|