1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
"""Test for cli."""
from click.testing import CliRunner
from iptvtools.cli import cli
def test_cli() -> None:
"""Test for cli."""
runner = CliRunner()
result = runner.invoke(cli)
assert result.exit_code == 0
assert "Usage" in result.output
def test_cli_filter_help() -> None:
"""Test the help for filter subcommand of the cli."""
runner = CliRunner()
result = runner.invoke(cli, ["filter", "--help"])
assert result.exit_code == 0
assert "Show this message and exit." in result.output
|