diff --git a/tests/test_server.py b/tests/test_server.py new file mode 100644 index 0000000..88f1dc1 --- /dev/null +++ b/tests/test_server.py @@ -0,0 +1,17 @@ +from click.testing import CliRunner +import pytest + +from bukuserver import server + +@pytest.mark.parametrize( + 'args,word', + [ + ('--help', 'bukuserver'), + ('--version', 'Buku') + ] +) +def test_cli(args, word): + runner = CliRunner() + result = runner.invoke(server.cli, [args]) + assert result.exit_code == 0 + assert word in result.output