keystone.tests.unit.resource package

Submodules

keystone.tests.unit.resource.test_backends module

class keystone.tests.unit.resource.test_backends.ResourceDriverTests[source]

Bases: object

Tests for the resource driver.

Subclasses must set self.driver to the driver instance.

test_create_project()[source]
test_create_project_all_defined_properties()[source]
test_create_project_null_domain()[source]
test_create_project_same_id_conflict()[source]
test_create_project_same_name_same_domain_conflict()[source]
class keystone.tests.unit.resource.test_backends.ResourceTests[source]

Bases: object

domain_count = 1
test_cache_layer_domain_crud(*args, **kwargs)[source]
test_cache_layer_project_crud(*args, **kwargs)[source]
test_cannot_delete_project_cascade_with_enabled_child()[source]
test_cannot_enable_cascade_with_parent_disabled()[source]
test_check_hierarchy_depth()[source]
test_check_leaf_projects()[source]
test_create_domain_under_regular_project_hierarchy_fails(*args, **kwargs)[source]
test_create_domain_with_project_api(*args, **kwargs)[source]
test_create_duplicate_project_id_fails()[source]
test_create_duplicate_project_name_fails()[source]
test_create_duplicate_project_name_in_different_domains()[source]
test_create_invalid_domain_fails()[source]
test_create_leaf_project_with_different_domain(*args, **kwargs)[source]
test_create_project_blank_name_fails()[source]
test_create_project_doesnt_modify_passed_in_dict()[source]
test_create_project_invalid_domain_id()[source]
test_create_project_invalid_enabled_type_string()[source]
test_create_project_invalid_name_fails()[source]
test_create_project_long_name_fails()[source]
test_create_project_passing_is_domain_flag_false()[source]
test_create_project_passing_is_domain_flag_true(*args, **kwargs)[source]
test_create_project_under_disabled_one()[source]
test_create_project_under_domain_hierarchy(*args, **kwargs)[source]
test_create_project_with_domain_id_and_without_parent_id()[source]
test_create_project_with_domain_id_mismatch_to_parent_domain()[source]
test_create_project_with_invalid_parent()[source]
test_create_project_with_no_enabled_field()[source]
test_create_project_with_parent_id_and_without_domain_id(*args, **kwargs)[source]
test_create_project_without_is_domain_flag()[source]
test_create_subproject_acting_as_domain_fails(*args, **kwargs)[source]
test_create_update_delete_unicode_project()[source]
test_delete_domain_with_project_api(*args, **kwargs)[source]
test_delete_hierarchical_leaf_project()[source]
test_delete_hierarchical_not_leaf_project()[source]
test_delete_large_project_cascade()[source]

Try delete a large project with cascade true.

Tree we will create:

 +-p1-+
 |    |
p5    p2
 |    |
p6  +-p3-+
    |    |
    p7   p4
test_delete_project_cascade()[source]
test_delete_project_returns_not_found()[source]
test_delete_projects_from_ids()[source]

Tests the resource backend call delete_projects_from_ids.

Tests the normal flow of the delete_projects_from_ids backend call, that ensures no project on the list exists after it is succesfully called.

test_delete_projects_from_ids_with_no_existing_project_id()[source]

Tests delete_projects_from_ids issues warning if not found.

Tests the resource backend call delete_projects_from_ids passing a non existing ID in project_ids, which is logged and ignored by the backend.

test_disable_hierarchical_leaf_project()[source]
test_disable_hierarchical_not_leaf_project()[source]
test_domain_crud()[source]
test_domain_delete_hierarchy()[source]
test_domain_name_case_sensitivity(*args, **kwargs)[source]
test_domain_rename_invalidates_get_domain_by_name_cache(*args, **kwargs)[source]
test_enable_project_with_disabled_parent()[source]
test_get_default_domain_by_name(*args, **kwargs)[source]
test_get_not_default_domain_by_name()[source]
test_get_project()[source]
test_get_project_by_name()[source]
test_get_project_by_name_for_project_acting_as_a_domain(*args, **kwargs)[source]

Tests get_project_by_name works when the domain_id is None.

test_get_project_by_name_returns_not_found()[source]
test_get_project_returns_not_found()[source]
test_hierarchical_projects_crud()[source]
test_is_domain_sub_project_has_parent_domain_id(*args, **kwargs)[source]
test_list_domains()[source]
test_list_project_parents()[source]
test_list_project_parents_invalid_project_id()[source]
test_list_projects()[source]
test_list_projects_acting_as_domain(*args, **kwargs)[source]
test_list_projects_for_alternate_domain(*args, **kwargs)[source]
test_list_projects_for_domain()[source]
test_list_projects_in_subtree()[source]
test_list_projects_in_subtree_invalid_project_id()[source]
test_list_projects_in_subtree_with_circular_reference()[source]
test_list_projects_with_multiple_filters()[source]
test_move_project_between_domains()[source]
test_move_project_between_domains_with_clashing_names_fails()[source]
test_move_project_not_root_between_domains_fails(*args, **kwargs)[source]
test_move_project_with_children_between_domains_fails(*args, **kwargs)[source]
test_move_root_project_between_domains_succeeds(*args, **kwargs)[source]
test_project_as_a_domain_uniqueness_constraints(*args, **kwargs)[source]

Tests project uniqueness for those acting as domains.

If it is a project acting as a domain, we can’t have two or more with the same name.

test_project_attribute_update()[source]
test_project_crud(*args, **kwargs)[source]
test_project_rename_invalidates_get_project_by_name_cache(*args, **kwargs)[source]
test_project_update_and_project_get_return_same_response()[source]
test_project_update_missing_attrs_with_a_falsey_value()[source]
test_project_update_missing_attrs_with_a_value()[source]
test_rename_duplicate_project_name_fails()[source]
test_update_cascade_only_accepts_enabled()[source]
test_update_domain_id_project_is_domain_fails(*args, **kwargs)[source]
test_update_project_blank_name_fails()[source]
test_update_project_enable()[source]
test_update_project_enabled_cascade()[source]

Test update_project_cascade

Ensures the enabled attribute is correctly updated across a simple 3-level projects hierarchy.

test_update_project_id_does_nothing()[source]
test_update_project_invalid_enabled_type_string()[source]
test_update_project_invalid_name_fails()[source]
test_update_project_long_name_fails()[source]
test_update_project_parent()[source]
test_update_project_returns_not_found()[source]

keystone.tests.unit.resource.test_controllers module

class keystone.tests.unit.resource.test_controllers.TenantTestCaseNoDefaultDomain(*args, **kwargs)[source]

Bases: keystone.tests.unit.core.TestCase

setUp()[source]
test_create_project()[source]
test_get_all_projects()[source]
test_setup()[source]

keystone.tests.unit.resource.test_core module

class keystone.tests.unit.resource.test_core.DomainConfigDriverTests[source]

Bases: object

test_create_sensitive_domain_config_twice()[source]
test_create_whitelisted_domain_config_twice()[source]
test_delete_sensitive_domain_configs()[source]
test_delete_whitelisted_domain_configs()[source]
test_list_sensitive_domain_config_crud()[source]
test_list_whitelisted_domain_config_crud()[source]
test_sensitive_domain_config_crud()[source]
test_whitelisted_domain_config_crud()[source]
class keystone.tests.unit.resource.test_core.DomainConfigTests[source]

Bases: object

clean_up_domain()[source]
setUp()[source]
test_cache_layer_get_sensitive_config(*args, **kwargs)[source]
test_config_registration()[source]
test_create_domain_config_including_sensitive_option()[source]
test_create_invalid_domain_config()[source]
test_delete_domain_deletes_configs()[source]

Test domain deletion clears the domain configs.

test_delete_invalid_partial_domain_config()[source]
test_delete_partial_domain_config()[source]
test_escaped_sequence_in_domain_config()[source]

Check that escaped ‘%(‘ doesn’t get interpreted.

test_get_options_not_in_domain_config()[source]
test_get_partial_domain_config()[source]
test_get_sensitive_config()[source]
test_invalid_sensitive_substitution_in_domain_config()[source]

Check that invalid substitutions raise warnings.

test_sensitive_substitution_in_domain_config()[source]
test_update_invalid_partial_domain_config()[source]
test_update_partial_domain_config()[source]
class keystone.tests.unit.resource.test_core.TestResourceManagerNoFixtures(*args, **kwargs)[source]

Bases: keystone.tests.unit.core.SQLDriverOverrides, keystone.tests.unit.core.TestCase

setUp()[source]
test_ensure_default_domain_exists()[source]
test_ensure_default_domain_exists_already_exists()[source]
test_ensure_default_domain_exists_fails()[source]
test_update_project_name_conflict()[source]

Module contents