buku/tests/test_server.py
2019-05-14 01:51:23 +08:00

18 lines
367 B
Python

import pytest
from click.testing import CliRunner
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