keystone.tests.unit.resource package

keystone.tests.unit.resource package

Submodules

keystone.tests.unit.resource.test_backends module

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

Bases: object

Test 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_doesnt_modify_passed_in_dict()[source]
test_create_project_invalid_domain_id()[source]
test_create_project_long_name_fails()[source]
test_create_project_name_with_trailing_whitespace()[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_clears_default_project_id()[source]
test_delete_project_returns_not_found()[source]
test_delete_project_with_roles_clears_default_project_id()[source]
test_delete_projects_from_ids()[source]

Test 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 successfully called.

test_delete_projects_from_ids_with_no_existing_project_id()[source]

Test 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]

Test 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_get_projects_in_subtree_as_ids_with_large_tree()[source]

Check project hierarchy is returned correctly in large tree.

With a large hierarchy we need to enforce the projects are returned in the correct order (illustrated below).

Tree we will create:

   +------p1------+
   |              |
+---p3---+      +-p2-+
|        |      |    |
p7    +-p6-+   p5    p4
|     |    |
p10   p9   p8
      |
     p11
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_project_as_a_domain_uniqueness_constraints(*args, **kwargs)[source]

Test 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_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_name_fails()[source]
test_update_project_long_name_fails()[source]
test_update_project_name_with_trailing_whitespace()[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_option_dict_fails_when_group_is_none()[source]
test_option_dict_returns_valid_config_values()[source]
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

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.