2019-02-08 05:38:24 -06:00
|
|
|
import pytest
|
2019-02-08 18:49:45 -06:00
|
|
|
from click.testing import CliRunner
|
2019-02-08 05:38:24 -06:00
|
|
|
|
|
|
|
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
|