tests.test_config

Location: Pulp SmashAPI Documentationtests.test_config

Unit tests for pulp_smash.config.

class tests.test_config.ConvertOldConfigTestCase(methodName='runTest')

Test pulp_smash.config.convert_old_config().

test_convert_old_config()

Assert the conversion works.

class tests.test_config.GetConfigFilePathTestCase(methodName='runTest')

Test pulp_smash.config._get_config_file_path.

test_failures()

Assert the method raises an exception when no config is found.

test_success()

Assert the method returns a path when a config file is found.

class tests.test_config.GetConfigTestCase(methodName='runTest')

Test pulp_smash.config.get_config().

test_cache_empty()

A config is read from disk if the cache is empty.

test_cache_full()

No config is read from disk if the cache is populated.

class tests.test_config.GetRequestsKwargsTestCase(methodName='runTest')

Test pulp_smash.config.PulpSmashConfig.get_requests_kwargs().

classmethod setUpClass()

Create a mock server config and call the method under test.

test_cfg_auth()

Assert that the method does not alter the config’s auth.

test_kwargs()

Assert that the method returns correct values.

test_kwargs_auth()

Assert that the method converts auth to a tuple.

class tests.test_config.HelperMethodsTestCase(methodName='runTest')

Test pulp_smash.config.PulpSmashConfig() helper methods.

setUp()

Generate contents for a configuration file.

test_get_systems()

get_systems returns proper result.

test_services_for_roles()

services_for_roles returns proper result.

class tests.test_config.InitTestCase(methodName='runTest')

Test pulp_smash.config.PulpSmashConfig instantiation.

classmethod setUpClass()

Generate some attributes and use them to instantiate a config.

test_private_attrs()

Assert that private attributes have been set.

test_public_attrs()

Assert that public attributes have correct values.

class tests.test_config.PulpSmashConfigFileTestCase(methodName='runTest')

Verify the PULP_SMASH_CONFIG_FILE environment var is respected.

test_var_set()

Set the environment variable.

test_var_unset()

Do not set the environment variable.

class tests.test_config.ReadTestCase(methodName='runTest')

Test pulp_smash.config.PulpSmashConfig.read().

test_read_config_file()

Ensure Pulp Smash can read the config file.

test_read_old_config_file()

Ensure Pulp Smash can read old config file format.

class tests.test_config.ReprTestCase(methodName='runTest')

Test calling repr on a pulp_smash.config.PulpSmashConfig.

classmethod setUpClass()

Generate attributes and call the method under test.

test_can_eval()

Assert that the result can be parsed by eval.

test_is_sane()

Assert that the result is in an expected set of results.

class tests.test_config.ValidateConfigTestCase(methodName='runTest')

Test pulp_smash.config.validate_config().

test_config_missing_roles()

Missing required roles in config raises an exception.

test_invalid_config()

An invalid config raises an exception.

test_valid_config()

A valid config does not raise an exception.