thunderbird_accounts.mail.tests.test_views

Classes

AddEmailAliasTestCase([methodName])

HomeViewRedirectTestCase([methodName])

Test redirect behavior for authenticated and unauthenticated users.

ZendeskContactFieldsTestCase([methodName])

ZendeskContactSubmitTestCase([methodName])

class thunderbird_accounts.mail.tests.test_views.HomeViewRedirectTestCase(methodName='runTest')[source]

Bases: TestCase

Test redirect behavior for authenticated and unauthenticated users.

setUp()[source]

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

test_unauthenticated_user_redirected_to_login_for_home()[source]

Test that unauthenticated users are redirected to login when accessing home.

test_unauthenticated_user_redirected_to_login_for_non_public_routes()[source]

Test that unauthenticated users are redirected to login for non-public routes.

test_unauthenticated_user_can_access_privacy_page()[source]

Test that unauthenticated users can access the /privacy public route.

test_unauthenticated_user_can_access_terms_page()[source]

Test that unauthenticated users can access the /terms public route.

test_authenticated_user_can_access_home()[source]

Test that authenticated users can access home without redirect.

test_authenticated_user_can_access_any_path()[source]

Test that authenticated users can access any path without redirect.

class thunderbird_accounts.mail.tests.test_views.AddEmailAliasTestCase(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

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

test_allowed_domain_alias_too_short()

Test that email aliases shorter than 3 characters are rejected for ALLOWED_EMAIL_DOMAINS.

test_allowed_domain_alias_minimum_length()

Test that email aliases of exactly 3 characters are accepted for ALLOWED_EMAIL_DOMAINS.

test_custom_domain_alias_short_allowed()

Test that short email aliases (< 3 chars) are allowed for custom domains (not in ALLOWED_EMAIL_DOMAINS).

test_custom_domain_alias_length_minimum_2()

Test that MIN_CUSTOM_DOMAIN_ALIAS_LENGTH=2 works correctly for both allowed and custom domains.

class thunderbird_accounts.mail.tests.test_views.ZendeskContactFieldsTestCase(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

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

class thunderbird_accounts.mail.tests.test_views.ZendeskContactSubmitTestCase(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

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

test_contact_submit_name_defaults_to_email_when_not_provided(mock_parse_ua, mock_client_cls)

Test that when name is not provided in the payload, it defaults to the email address.

test_contact_submit_uses_name_from_payload_when_provided(mock_parse_ua, mock_client_cls)

Test that when name is provided in the payload, it uses that name instead of defaulting to email.