chapps.tests.test_config.test_config module

Tests for CHAPPS configuration code

class chapps.tests.test_config.test_config.Test_Config[source]

Bases: object

test_what_config_file_returns_path(chapps_test_env)[source]
test_what_config_file(chapps_test_cfg_path, chapps_test_env)[source]
test_mock_config_file(chapps_mock_cfg_path, chapps_mock_env)[source]
test_setup_config()[source]
test_write_config(chapps_mock_config, chapps_mock_config_file, chapps_mock_cfg_path)[source]

Test that when we write a config file, one is written that contains the config

test_write_config_bad_path(chapps_mock_config)[source]

Verify that an OSError is raised if the write path is unworkable.

test_self_write(chapps_test_env, chapps_test_cfg_path)[source]
test_chapps_config_defaults(chapps_test_env)[source]

Ensure that all CHAPPS settings defaults are present

test_policy_config_adapter_defaults(chapps_test_env)[source]
test_oqp_config_defaults(chapps_test_env)[source]

Ensure that all default policy origin settings are present

test_redis_config_defaults(chapps_test_env)[source]

Ensure that all Redis setting defaults are present

test_config_overrides(chapps_mock_env, chapps_mock_config_file, chapps_mock_config, chapps_mock_cfg_path)[source]

Test a bunch of keys to show that an non-default config prevails

test_get_block(chapps_mock_env, chapps_mock_config_file, chapps_mock_config, chapps_mock_cfg_path)[source]
test_helo_whitelist(chapps_helo_env, chapps_helo_config_file, chapps_helo_config, chapps_helo_cfg_path)[source]