buku/tests/test_server.py

18 lines
367 B
Python
Raw Normal View History

import pytest
2019-02-08 18:49:45 -06:00
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