18 lines
367 B
Python
18 lines
367 B
Python
|
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
|