Debian Codegraph @

tests/units/cli/check/test__init__.py

raw symbols SCIP
1 # Copyright (c) 2023-2026 Arista Networks, Inc.
2 # Use of this source code is governed by the Apache License 2.0
3 # that can be found in the LICENSE file.
4 """Tests for anta.cli.check."""
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_check(click_runner: CliRunner) -> None:
18 """Test anta check."""
19 result = click_runner.invoke(anta, ["check"])
20 assert result.exit_code == ExitCode.USAGE_ERROR
21 assert "Usage: anta check" in result.output
22
23
24 def test_anta_check_help(click_runner: CliRunner) -> None:
25 """Test anta check --help."""
26 result = click_runner.invoke(anta, ["check", "--help"])
27 assert result.exit_code == ExitCode.OK
28 assert "Usage: anta check" in result.output