Orchestrata Ultimate › Tests › Reference › postman › test_postman_config

Tests reference — tests/postman/test_postman_config.py

Module of tests/postman, split out because the directory page would be too large.

Prose pending.

tests/postman/test_postman_config.py

source · 27 tests · 591 lines

Comprehensive tests for PostmanConfigManager.

Covers: postman.config, postman.exceptions

Kind Name Line Description
function test_default_initialization_no_config_file 104 Test initialization without config file uses defaults.
function test_yaml_config_loading 119 Test loading configuration from YAML file.
function test_environment_variable_overrides 141 Test environment variables override default config.
function test_nested_env_var_overrides_double_underscore 158 Test nested environment variables using double underscore.
function test_value_conversion_types 180 Test environment value conversion to int, float, bool, string.
function test_dot_notation_get 213 Test get() with dot-notation access.
function test_validation_valid_config 239 Test validation passes for valid configuration.
function test_validation_invalid_port_zero 257 Test validation fails for port = 0.
function test_validation_invalid_port_too_high 269 Test validation fails for port > 65535.
function test_validation_invalid_max_message_size_zero 281 Test validation fails for max_message_size = 0.
function test_validation_invalid_max_message_size_negative 293 Test validation fails for negative max_message_size.
function test_validation_invalid_max_queue_size 304 Test validation fails for max_queue_size <= 0.
function test_validation_invalid_default_ttl 315 Test validation fails for default_ttl <= 0.
function test_validation_invalid_thread_pool_size 326 Test validation fails for thread_pool_size <= 0.
function test_validation_invalid_retry_policy_not_dict 337 Test validation fails when retry_policy is not a dict.
function test_reload_triggers_callbacks 353 Test that reload() triggers registered callbacks.
function test_on_change_callback_registration 393 Test registering multiple callbacks.
function test_dict_to_config_with_defaults 424 Test _dict_to_config fills missing values with defaults.
function test_dict_to_config_retry_policy_not_dict_raises 444 Test _dict_to_config raises when retry_policy is not dict.
function test_invalid_config_error_on_bad_yaml 462 Test InvalidConfigError raised on malformed YAML.
function test_watch_for_changes_starts_thread 473 Test watch_for_changes=True starts background thread.
function test_stop_watch_stops_thread 488 Test stop_watch() stops the background thread.
function test_yaml_not_available_raises_error 512 Test that attempting to load YAML without PyYAML raises error.
function test_nonexistent_config_file_loads_defaults 530 Test that nonexistent config file path loads defaults.
function test_env_overrides_yaml_config 541 Test environment variables override YAML config values.
function test_callback_exception_handling 554 Test that callback exceptions don't break reload.
function test_multiple_validation_errors 574 Test multiple validation errors are collected.