| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
"""Tests for anta.cli.debug.""" |
| 5 |
|
| 6 |
from __future__ import annotations |
| 7 |
|
| 8 |
from typing import TYPE_CHECKING |
| 9 |
|
| 10 |
from anta.cli import anta |
| 11 |
from anta.cli.utils import ExitCode |
| 12 |
|
| 13 |
if TYPE_CHECKING: |
| 14 |
from click.testing import CliRunner |
| 15 |
|
| 16 |
|
| 17 |
def test_anta_debug(click_runner: CliRunner) -> None: |
| 18 |
"""Test anta debug.""" |
| 19 |
result = click_runner.invoke(anta, ["debug"]) |
| 20 |
assert result.exit_code == ExitCode.USAGE_ERROR |
| 21 |
assert "Usage: anta debug" in result.output |
| 22 |
|
| 23 |
|
| 24 |
def test_anta_debug_help(click_runner: CliRunner) -> None: |
| 25 |
"""Test anta debug --help.""" |
| 26 |
result = click_runner.invoke(anta, ["debug", "--help"]) |
| 27 |
assert result.exit_code == ExitCode.OK |
| 28 |
assert "Usage: anta debug" in result.output |