django_pam.accounts.tests package

django_pam.accounts.tests.test_accounts_forms module

class django_pam.accounts.tests.test_accounts_forms.TestAuthenticationForm(name)[source]

Bases: BaseDjangoPAM

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_invalid_credentials()[source]

Test for invalid credentials.

test_missing_credentials()[source]

Test for missing credentials.

test_user_created()[source]

Test that the form created a user.

Form constructor signature:

__init__(self, request=None, *args, **kwargs)

django_pam.accounts.tests.test_accounts_views module

class django_pam.accounts.tests.test_accounts_views.TestLoginView(name)[source]

Bases: BaseDjangoPAM

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_get_login_screen()[source]

Test that the login screen returns properly.

test_post_login_ajax_invalid()[source]

Test that an invalid AJAX login returns a redirect properly.

test_post_login_ajax_valid()[source]

Test that a valid AJAX login returns a redirect properly.

test_post_login_form_invalid()[source]

Test that an invalid form login returns a redirect properly.

test_post_login_form_invalid_redirection()[source]

Test that redirection will not take you off site.

test_post_login_form_valid()[source]

Test that a valid form login returns a redirect properly.

class django_pam.accounts.tests.test_accounts_views.TestLogoutView(name)[source]

Bases: BaseDjangoPAM

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_get_logout_screen()[source]

Test that the logout screen returns properly.

test_post_logout_ajax()[source]

Test that a valid ajax logout returns properly.

test_post_logout_form()[source]

Test that a valid form logout returns a redirect properly.

test_post_logout_form_invalid()[source]

Test that if the success_url is not set an exception is raised. This will leave a traceback and error message in a log file because we’re testing that condition.