keystone.tests.unit.common package
Submodules
keystone.tests.unit.common.test_connection_pool module
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, **kwds)[source]
Bases: keystone.tests.unit.core.BaseTestCase
-
setUp()[source]
-
test_resource_created_notification()[source]
-
test_resource_deleted_notification()[source]
-
test_resource_disabled_notification()[source]
-
test_resource_updated_notification()[source]
-
class keystone.tests.unit.common.test_notifications.BaseNotificationTest(*args, **kwds)[source]
Bases: keystone.tests.unit.test_v3.RestfulTestCase
-
setUp()[source]
-
class keystone.tests.unit.common.test_notifications.CADFNotificationsForEntities(*args, **kwds)[source]
Bases: keystone.tests.unit.common.test_notifications.NotificationsForEntities
-
setUp()[source]
-
test_initiator_data_is_set()[source]
-
class keystone.tests.unit.common.test_notifications.CadfNotificationsWrapperTestCase(*args, **kwds)[source]
Bases: keystone.tests.unit.test_v3.RestfulTestCase
-
ACTION = 'authenticate'
-
LOCAL_HOST = 'localhost'
-
ROLE_ASSIGNMENT = 'role_assignment'
-
setUp()[source]
-
test_add_role_to_user_and_project()[source]
-
test_group_domain_grant()[source]
-
test_remove_role_from_user_and_project()[source]
-
test_user_project_grant()[source]
-
test_v3_authenticate_user_id()[source]
-
test_v3_authenticate_user_name_and_domain_id()[source]
-
test_v3_authenticate_user_name_and_domain_name()[source]
-
class keystone.tests.unit.common.test_notifications.NotificationsForEntities(*args, **kwds)[source]
Bases: keystone.tests.unit.common.test_notifications.BaseNotificationTest
-
test_config_option_no_events()[source]
-
test_create_domain()[source]
-
test_create_endpoint()[source]
-
test_create_group()[source]
-
test_create_policy()[source]
-
test_create_project()[source]
-
test_create_region()[source]
-
test_create_role()[source]
-
test_create_service()[source]
-
test_create_trust()[source]
-
test_create_user()[source]
-
test_delete_domain()[source]
-
test_delete_endpoint()[source]
-
test_delete_group()[source]
-
test_delete_policy()[source]
-
test_delete_project()[source]
-
test_delete_region()[source]
-
test_delete_role()[source]
-
test_delete_service()[source]
-
test_delete_trust()[source]
-
test_delete_user()[source]
-
test_disable_domain()[source]
-
test_disable_of_disabled_domain_does_not_notify()[source]
-
test_disable_of_disabled_project_does_not_notify()[source]
-
test_disable_project()[source]
-
test_update_domain()[source]
-
test_update_endpoint()[source]
-
test_update_group()[source]
-
test_update_policy()[source]
-
test_update_project()[source]
-
test_update_project_does_not_send_disable()[source]
-
test_update_region()[source]
-
test_update_role()[source]
-
test_update_service()[source]
-
test_update_user()[source]
-
class keystone.tests.unit.common.test_notifications.NotificationsTestCase(*args, **kwds)[source]
Bases: keystone.tests.unit.core.BaseTestCase
-
test_send_notification()[source]
Test the private method _send_notification to ensure event_type,
payload, and context are built and passed properly.
-
class keystone.tests.unit.common.test_notifications.NotificationsWrapperTestCase(*args, **kwds)[source]
Bases: keystone.tests.unit.core.BaseTestCase
-
create_exception(*args, **kwargs)[source]
Send a notification if the wrapped callable is successful.
-
create_fake_ref()[source]
-
create_resource(*args, **kwargs)[source]
Send a notification if the wrapped callable is successful.
-
delete_exception(*args, **kwargs)[source]
Send a notification if the wrapped callable is successful.
-
delete_resource(*args, **kwargs)[source]
Send a notification if the wrapped callable is successful.
-
test_create_exception_without_notification()[source]
-
test_delete_exception_without_notification()[source]
-
test_resource_created_notification()[source]
-
test_resource_deleted_notification()[source]
-
test_resource_updated_notification()[source]
-
test_update_exception_without_notification()[source]
-
update_exception(*args, **kwargs)[source]
Send a notification if the wrapped callable is successful.
-
update_resource(*args, **kwargs)[source]
Send a notification if the wrapped callable is successful.
-
class keystone.tests.unit.common.test_notifications.TestCallbackRegistration(*args, **kwds)[source]
Bases: keystone.tests.unit.core.BaseTestCase
-
setUp()[source]
-
test_a_function_callback()[source]
-
test_a_list_of_callbacks()[source]
-
test_a_method_callback()[source]
-
test_an_invalid_callback()[source]
-
test_an_invalid_event()[source]
-
verify_log_message(data)[source]
Tests that use this are a little brittle because adding more
logging can break them.
TODO(dstanek): remove the need for this in a future refactoring
-
class keystone.tests.unit.common.test_notifications.TestEventCallbacks(*args, **kwds)[source]
Bases: keystone.tests.unit.test_v3.RestfulTestCase
-
setUp()[source]
-
test_event_registration_for_unknown_resource_type()[source]
-
test_invalid_event_callbacks()[source]
-
test_invalid_event_callbacks_event()[source]
-
test_notification_event_not_valid()[source]
-
test_notification_method_not_callable()[source]
-
test_notification_received()[source]
-
test_provider_event_callback_subscription()[source]
-
test_provider_event_callbacks_subscription()[source]
-
test_using_an_unbound_method_as_a_callback_fails()[source]
-
class keystone.tests.unit.common.test_notifications.V2Notifications(*args, **kwds)[source]
Bases: keystone.tests.unit.common.test_notifications.BaseNotificationTest
-
setUp()[source]
-
test_project()[source]
-
test_role()[source]
-
test_service_and_endpoint()[source]
-
test_user()[source]
-
keystone.tests.unit.common.test_notifications.register_callback(operation, resource_type='38f0a414c8a843398e03ee9c96a5c22f')[source]
Helper for creating and registering a mock callback.
Module contents