waft.framework_unit_tests.test_cli.test_config module

waft.framework_unit_tests.test_cli.test_config.clean_temp_config(tmp_path)

Create a temporary config file for testing using pytest’s tmp_path fixture.

Returns a Path object. Creates a minimal valid JSON config file with a UUID-based name in the pytest temporary directory. Removes it when testing is done if it exists.

waft.framework_unit_tests.test_cli.test_config.temp_config_file()

Create a temporary config file for testing using NamedTemporaryFile.

Returns a string path to the file. Creates an empty file with random name. Removes it when testing is done.

waft.framework_unit_tests.test_cli.test_config.test_add_and_remove_group(clean_temp_config)

Test that waft config create-group and remove-group work as expected.

waft.framework_unit_tests.test_cli.test_config.test_add_and_remove_proxy(clean_temp_config)

Test that waft config add-proxy and remove-proxy work as expected.

waft.framework_unit_tests.test_cli.test_config.test_add_and_remove_system(clean_temp_config)

Test that waft config add-system and remove-system work as expected.

waft.framework_unit_tests.test_cli.test_config.test_add_duplicate_system_fails(clean_temp_config)

Test that waft config add-system fails when adding a duplicate system.

waft.framework_unit_tests.test_cli.test_config.test_add_system_creates_config_at_path_if_not_exists(tmp_path)

Test that waft config add system creates a config file at the specified path if it does not exist.

waft.framework_unit_tests.test_cli.test_config.test_add_system_missing_fields_fails(clean_temp_config)

Test that waft config add system fails when adding a system with missing fields.

waft.framework_unit_tests.test_cli.test_config.test_create_group_with_nonexistent_system_fails(clean_temp_config)

Test that waft config create group fails when creating a group with a nonexistent system.

waft.framework_unit_tests.test_cli.test_config.test_operations_on_empty_config_file(tmp_path)

Test that config operations work correctly on a minimal valid config file.

waft.framework_unit_tests.test_cli.test_config.test_operations_on_invalid_json_config_file(tmp_path)

Test that config operations correctly handle a config file with malformed JSON.

waft.framework_unit_tests.test_cli.test_config.test_remove_nonexistent_group_fails(clean_temp_config)

Test that waft config remove group fails when removing a nonexistent group.

waft.framework_unit_tests.test_cli.test_config.test_remove_nonexistent_system_fails(clean_temp_config)

Test that waft config remove system fails when removing a nonexistent system.

waft.framework_unit_tests.test_cli.test_config.test_show_config_creates_file_when_not_exists(tmp_path)

Test that waft config show creates the config file when it doesn’t exist.

waft.framework_unit_tests.test_cli.test_config.test_show_empty_config(clean_temp_config)

Test that waft config show shows empty config when the config file is empty.

waft.framework_unit_tests.test_cli.test_config.test_where_prints_config_location(monkeypatch)

Test that waft config where prints the correct config file location.