registration.tests package

Submodules

registration.tests.compat module

registration.tests.mock module

registration.tests.mock.mock_request()[source]

Construct and return a mock HttpRequest object; this is used in testing backend methods which expect an HttpRequest but which are not being called from views.

registration.tests.mock.mock_site()[source]

Construct and return a mock Site` object; this is used in testing methods which expect an Site

registration.tests.test_admin module

class registration.tests.test_admin.RegistrationAdminTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

setUp()[source]
test_accept_users_action()[source]
test_change_list_view_get()[source]
test_change_view_get()[source]
test_change_view_get_404()[source]
test_change_view_post_invalid_activate_from_rejected()[source]
test_change_view_post_invalid_activate_from_untreated()[source]
test_change_view_post_invalid_force_activate_from_accepted()[source]
test_change_view_post_invalid_reject_from_accepted()[source]
test_change_view_post_invalid_reject_from_rejected()[source]
test_change_view_post_valid_accept_from_accepted()[source]
test_change_view_post_valid_accept_from_rejected()[source]
test_change_view_post_valid_accept_from_untreated()[source]
test_change_view_post_valid_activate_from_accepted()[source]
test_change_view_post_valid_force_activate_from_rejected()[source]
test_change_view_post_valid_force_activate_from_untreated()[source]
test_change_view_post_valid_reject_from_untreated()[source]
test_force_activate_users_action()[source]
test_get_inline_instances_with_default_supplements(*args, **kwargs)[source]
test_get_inline_instances_without_supplements(*args, **kwargs)[source]
test_reject_users_action()[source]
test_resend_acceptance_email_action()[source]

registration.tests.test_backends module

class registration.tests.test_backends.DefaultRegistrationBackendTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

setUp()[source]
test_acceptance()[source]
test_acceptance_signal()[source]
test_acceptance_signal_fail()[source]
test_activation_signal()[source]
test_activation_with_password()[source]
test_activation_without_password()[source]
test_allow()[source]
test_expired_activation()[source]
test_get_activation_complete_url()[source]
test_get_activation_form_class()[source]
test_get_registration_closed_url()[source]
test_get_registration_complete_url()[source]
test_get_registration_form_class()[source]
test_registration()[source]
test_registration_signal()[source]
test_registration_signal_with_supplement(*args, **kwargs)[source]
test_rejected_activation()[source]
test_rejection()[source]
test_rejection_signal()[source]
test_rejection_signal_fail()[source]
test_untreated_activation()[source]
class registration.tests.test_backends.RegistrationBackendRetrievalTests(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

test_backend_attribute_error()[source]
test_backend_error_invalid()[source]
test_get_backend()[source]

registration.tests.test_forms module

class registration.tests.test_forms.ActivationFormTests(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

Test the default registration forms.

test_activation_form()[source]

Test that ActivationForm enforces username constraints and matching passwords.

class registration.tests.test_forms.RegistrationFormTests(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

Test the default registration forms.

test_registration_form()[source]

Test that RegistrationForm enforces username constraints and matching passwords.

test_registration_form_no_free_email()[source]

Test that RegistrationFormNoFreeEmail disallows registration with free email addresses.

test_registration_form_tos()[source]

Test that RegistrationFormTermsOfService requires agreement to the terms of service.

test_registration_form_unique_email()[source]

Test that RegistrationFormUniqueEmail validates uniqueness of email addresses.

registration.tests.test_models module

class registration.tests.test_models.RegistrationProfileManagerTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

setUp()[source]
test_acceptance()[source]
test_acceptance_after_acceptance_fail()[source]
test_acceptance_after_rejection_success()[source]
test_acceptance_email()[source]
test_acceptance_force()[source]
test_acceptance_no_email()[source]
test_activation_email()[source]
test_activation_no_email()[source]
test_activation_with_expired_fail()[source]
test_activation_with_invalid_key_fail()[source]
test_activation_with_password()[source]
test_activation_with_rejected_fail()[source]
test_activation_with_untreated_fail()[source]
test_activation_without_password()[source]
test_expired_user_deletion()[source]
test_management_command_cleanup_expired_registrations()[source]
test_management_command_cleanup_registrations()[source]
test_management_command_cleanup_rejected_registrations()[source]
test_management_command_cleanupregistration()[source]
test_register()[source]
test_register_email()[source]
test_register_no_email()[source]
test_rejected_user_deletion()[source]
test_rejection()[source]
test_rejection_after_acceptance_fail()[source]
test_rejection_after_rejection_fail()[source]
test_rejection_email()[source]
test_rejection_no_email()[source]
user_info = {u'username': u'alice', u'email': u'alice@example.com'}
class registration.tests.test_models.RegistrationProfileTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

create_inactive_user()[source]
setUp()[source]
test_profile_creation()[source]
test_profile_status_modification()[source]
test_send_acceptance_email()[source]
test_send_activation_email()[source]
test_send_registration_email()[source]
test_send_rejection_email()[source]
user_info = {u'username': u'alice', u'password': u'password', u'email': u'alice@example.com'}

registration.tests.test_supplements module

class registration.tests.test_supplements.RegistrationSupplementRetrievalTests(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

test_get_supplement_class()[source]
test_supplement_attribute_error()[source]
test_supplement_error_invalid()[source]
class registration.tests.test_supplements.RegistrationViewWithDefaultRegistrationSupplementTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

test_registration_view_get()[source]

A GET to the register view uses the appropriate template and populates the registration form into the context.

test_registration_view_post_failure()[source]

A POST to the register view with invalid data does not create a user, and displays appropriate error messages.

test_registration_view_post_no_remarks_failure()[source]

A POST to the register view with invalid data does not create a user, and displays appropriate error messages.

test_registration_view_post_success()[source]

A POST to the register view with valid data properly creates a new user and issues a redirect.

registration.tests.test_views module

class registration.tests.test_views.RegistrationViewTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

setUp()[source]
test_activation_view_get_fail()[source]

A GET to the ActivationView view wht invalid activation_key raise Http404

test_activation_view_get_success()[source]

A GET to the ActivationView view with valid activation_key

test_activation_view_post_failure()[source]

A POST to the ActivationView view with invalid data does not activate a user, and raise Http404

test_activation_view_post_success()[source]

A POST to the ActivationView view with valid data properly handles a valid activation

test_registration_complete_view_get()[source]

A GET to the complete view uses the appropriate template and populates the registration form into the context.

test_registration_view_closed()[source]

Any attempt to access the register view when registration is closed fails and redirects.

test_registration_view_get()[source]

A GET to the register view uses the appropriate template and populates the registration form into the context.

test_registration_view_post_failure()[source]

A POST to the register view with invalid data does not create a user, and displays appropriate error messages.

test_registration_view_post_success()[source]

A POST to the register view with valid data properly creates a new user and issues a redirect.

registration.tests.utils module

registration.tests.utils.with_apps(*apps)[source]

Class decorator that makes sure the passed apps are present in INSTALLED_APPS.

Module contents