waft.framework_unit_tests.test_cli.test_dashboard_cli module¶
Unit tests for dashboard CLI commands.
- class waft.framework_unit_tests.test_cli.test_dashboard_cli.TestDashboardShowCommand¶
Bases:
objectTests for dashboard show command.
- test_show_with_valid_auth()¶
Test show command with mocked authentication.
- test_show_without_auth_fails()¶
Test that show command fails without authentication.
- class waft.framework_unit_tests.test_cli.test_dashboard_cli.TestDeviceProfileExcludeCommand¶
Bases:
objectTests for device-profile exclude command.
- test_exclude_with_address()¶
Test exclude command with address option.
- class waft.framework_unit_tests.test_cli.test_dashboard_cli.TestDeviceProfileIncludeCommand¶
Bases:
objectTests for device-profile include command.
- test_include_requires_items()¶
Test that include command requires at least one item.
- test_include_with_domain()¶
Test include command with domain option.
- test_include_with_file(tmp_path: Path)¶
Test include command with file option.
- test_include_with_nonexistent_file()¶
Test include command with nonexistent file.
- class waft.framework_unit_tests.test_cli.test_dashboard_cli.TestDeviceProfileListCommand¶
Bases:
objectTests for device-profile list command.
- test_list_profiles_with_valid_auth()¶
Test listing device profiles with mocked data.
- class waft.framework_unit_tests.test_cli.test_dashboard_cli.TestParseItem¶
Bases:
objectTests for _parse_item helper function.
- test_parse_domain()¶
Test parsing a domain string.
- test_parse_invalid_cidr_as_domain()¶
Test that invalid CIDR notation falls back to domain.
- test_parse_ipv4_address()¶
Test parsing an IPv4 address.
- test_parse_ipv4_network()¶
Test parsing an IPv4 CIDR network.
- test_parse_ipv4_network_non_strict()¶
Test parsing an IPv4 CIDR with host bits set (non-strict mode).
- class waft.framework_unit_tests.test_cli.test_dashboard_cli.TestReadItemsFromFile¶
Bases:
objectTests for _read_items_from_file helper function.
- test_read_domains_from_file(tmp_path: Path)¶
Test reading domains from a file.
- test_read_file_ignores_comments(tmp_path: Path)¶
Test that comments are ignored.
- test_read_file_ignores_empty_lines(tmp_path: Path)¶
Test that empty lines are ignored.
- test_read_file_not_found(tmp_path: Path)¶
Test that FileNotFoundError raises BadParameter.
- test_read_file_strips_whitespace(tmp_path: Path)¶
Test that whitespace is stripped from lines.
- test_read_mixed_items_from_file(tmp_path: Path)¶
Test reading mixed domains and IPs from a file.
- waft.framework_unit_tests.test_cli.test_dashboard_cli.run_cli_command(command: list[str])¶
Run a WAFT CLI dashboard command.