new: test: simple test for bukuserver cli
This commit is contained in:
parent
e8a2a9a96b
commit
7ff6994d9d
17
tests/test_server.py
Normal file
17
tests/test_server.py
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user