keystone.tests.unit.common package¶
Submodules¶
keystone.tests.unit.common.test_authorization module¶
keystone.tests.unit.common.test_cache module¶
-
class
keystone.tests.unit.common.test_cache.
TestCacheRegion
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.BaseTestCase
-
setUp
()¶
-
test_combination
()¶
-
test_direct_region_key_invalidation
()¶ Invalidate by manually clearing the region key’s value.
NOTE(dstanek): I normally don’t like tests that repeat application logic, but in this case we need to. There are too many ways that the tests above can erroneosly pass that we need this sanity check.
-
test_memoize_decorator_when_invalidating_the_region
()¶
-
test_multi_methods_when_invalidating_the_region
()¶
-
test_region_multi_methods_delete
()¶
-
test_region_singular_methods_delete
()¶
-
test_singular_methods_when_invalidating_the_region
()¶
-
keystone.tests.unit.common.test_injection module¶
keystone.tests.unit.common.test_json_home module¶
keystone.tests.unit.common.test_ldap module¶
-
class
keystone.tests.unit.common.test_ldap.
CommonLdapTestCase
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.BaseTestCase
These test cases call functions in keystone.common.ldap.
-
class
keystone.tests.unit.common.test_ldap.
DnCompareTest
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.BaseTestCase
Tests for the DN comparison functions in keystone.common.ldap.core.
-
class
keystone.tests.unit.common.test_ldap.
LDAPDeleteTreeTest
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.TestCase
-
clear_database
()¶
-
config_files
()¶
-
config_overrides
()¶
-
setUp
()¶
-
test_delete_tree
()¶ Test manually deleting a tree.
Few LDAP servers support CONTROL_DELETETREE. This test exercises the alternate code paths in BaseLdap.delete_tree.
-
-
class
keystone.tests.unit.common.test_ldap.
LDAPFilterQueryCompositionTest
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.TestCase
These test cases test LDAP filter generation.
-
class
keystone.tests.unit.common.test_ldap.
LDAPPagedResultsTest
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.TestCase
Tests the paged results functionality in keystone.common.ldap.core.
-
class
keystone.tests.unit.common.test_ldap.
MultiURLTests
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.TestCase
Tests for setting multiple LDAP URLs.
-
class
keystone.tests.unit.common.test_ldap.
SslTlsTest
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.TestCase
Tests for the SSL/TLS functionality in keystone.common.ldap.core.
keystone.tests.unit.common.test_manager module¶
-
class
keystone.tests.unit.common.test_manager.
TestCreateLegacyDriver
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.BaseTestCase
-
test_class_is_properly_deprecated
(*args, **keywargs)¶
-
keystone.tests.unit.common.test_notifications module¶
-
exception
keystone.tests.unit.common.test_notifications.
ArbitraryException
[source]¶ Bases:
exceptions.Exception
-
class
keystone.tests.unit.common.test_notifications.
AuditNotificationsTestCase
(*args, **kwargs)[source]¶
-
class
keystone.tests.unit.common.test_notifications.
BaseNotificationTest
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.test_v3.RestfulTestCase
-
setUp
()¶
-
-
class
keystone.tests.unit.common.test_notifications.
CADFNotificationsForEntities
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.common.test_notifications.NotificationsForEntities
-
setUp
()¶
-
test_initiator_data_is_set
()¶
-
-
class
keystone.tests.unit.common.test_notifications.
CadfNotificationsWrapperTestCase
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.test_v3.RestfulTestCase
-
ACTION
= 'authenticate'¶
-
LOCAL_HOST
= 'localhost'¶
-
ROLE_ASSIGNMENT
= 'role_assignment'¶
-
setUp
()¶
-
test_add_role_to_user_and_project
()¶
-
test_group_domain_grant
()¶
-
test_remove_role_from_user_and_project
()¶
-
test_user_project_grant
()¶
-
test_v3_authenticate_user_id
()¶
-
test_v3_authenticate_user_name_and_domain_id
()¶
-
test_v3_authenticate_user_name_and_domain_name
()¶
-
-
class
keystone.tests.unit.common.test_notifications.
NotificationsForEntities
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.common.test_notifications.BaseNotificationTest
-
test_add_user_to_group
()¶
-
test_config_option_no_events
()¶
-
test_create_domain
()¶
-
test_create_endpoint
()¶
-
test_create_group
()¶
-
test_create_policy
()¶
-
test_create_project
()¶
-
test_create_region
()¶
-
test_create_role
()¶
-
test_create_service
()¶
-
test_create_trust
()¶
-
test_create_user
()¶
-
test_delete_domain
()¶
-
test_delete_endpoint
()¶
-
test_delete_group
()¶
-
test_delete_policy
()¶
-
test_delete_project
()¶
-
test_delete_region
()¶
-
test_delete_role
()¶
-
test_delete_service
()¶
-
test_delete_trust
()¶
-
test_delete_user
()¶
-
test_disable_domain
()¶
-
test_disable_of_disabled_domain_does_not_notify
()¶
-
test_disable_of_disabled_project_does_not_notify
()¶
-
test_disable_project
()¶
-
test_remove_user_from_group
()¶
-
test_update_domain
()¶
-
test_update_endpoint
()¶
-
test_update_group
()¶
-
test_update_policy
()¶
-
test_update_project
()¶
-
test_update_project_does_not_send_disable
()¶
-
test_update_region
()¶
-
test_update_role
()¶
-
test_update_service
()¶
-
test_update_user
()¶
-
-
class
keystone.tests.unit.common.test_notifications.
NotificationsTestCase
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.BaseTestCase
-
test_opt_out_authenticate_event
()¶ Test that authenticate events are successfully opted out.
-
test_send_audit_notification_with_opt_out
()¶ Test the private method _send_audit_notification with opt-out.
Test that _send_audit_notification does not notify when a valid notification_opt_out configuration is provided.
-
test_send_notification
()¶ Test _send_notification.
Test the private method _send_notification to ensure event_type, payload, and context are built and passed properly.
-
test_send_notification_with_opt_out
()¶ Test the private method _send_notification with opt-out.
Test that _send_notification does not notify when a valid notification_opt_out configuration is provided.
-
-
class
keystone.tests.unit.common.test_notifications.
TestCallbackRegistration
(*args, **kwargs)[source]¶
-
class
keystone.tests.unit.common.test_notifications.
TestEventCallbacks
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.test_v3.RestfulTestCase
-
setUp
()¶
-
test_event_registration_for_unknown_resource_type
()¶
-
test_invalid_event_callbacks
()¶
-
test_invalid_event_callbacks_event
()¶
-
test_notification_event_not_valid
()¶
-
test_notification_method_not_callable
()¶
-
test_notification_received
()¶
-
test_provider_event_callback_subscription
()¶
-
test_provider_event_callbacks_subscription
()¶
-
test_using_an_unbound_method_as_a_callback_fails
()¶
-
keystone.tests.unit.common.test_sql_core module¶
-
class
keystone.tests.unit.common.test_sql_core.
TestModel
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
,keystone.common.sql.core.ModelDictMixin
-
id
¶
-
text
¶
-
-
class
keystone.tests.unit.common.test_sql_core.
TestModelDictMixin
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.BaseTestCase
-
test_creating_a_dict_from_a_model_instance
()¶
-
test_creating_a_dict_from_a_model_instance_that_has_extra_attrs
()¶
-
test_creating_a_model_instance_from_a_dict
()¶
-
test_creating_a_model_instance_from_an_invalid_dict
()¶
-
keystone.tests.unit.common.test_utils module¶
-
class
keystone.tests.unit.common.test_utils.
ServiceHelperTests
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.BaseTestCase
-
test_fail_gracefully
()¶
-
-
class
keystone.tests.unit.common.test_utils.
UtilsTestCase
(*args, **kwargs)[source]¶ Bases:
keystone.tests.unit.core.BaseTestCase
-
OPTIONAL
= <object object>¶
-