thunderbird_accounts.authentication.tests.test_api

Classes

ActiveSessionsTestcase([methodName])

CanISignUpTestcase([methodName])

ConnectedAppsTestcase([methodName])

CreateTestAllowListEntryTestCase([methodName])

SignUpTestcase([methodName])

WaffleFlagsTestcase([methodName])

class thunderbird_accounts.authentication.tests.test_api.SignUpTestcase(methodName='runTest')[source]

Bases: APITestCase

setUp()[source]

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

get_messages(response)[source]

Little helper message to retrieve flash messages

make_sign_up_data(*args, **kwargs) → dict[source]

Factory for sign up data. Pass in kwargs to override any data you need.

test_success(mock_import_user: MagicMock)

Test that an unauthenticated user can sign-up if they’re in the allow list.

test_success_stores_display_name(mock_import_user: MagicMock)

The name entered during sign-up is stored on the local user and forwarded to Keycloak.

test_success_without_name_falls_back_to_username(mock_import_user: MagicMock)

When no name is provided the display name falls back to the username and Keycloak gets no name.

test_success_with_zoneinfo_null(mock_import_user: MagicMock)

Test that an unauthenticated user can sign-up if they’re in the allow list.

test_not_on_allowed_list(mock_import_user: MagicMock)

Test that a recovery email not on the allow list will ship them to the wait list

test_user_already_exists(mock_import_user: MagicMock)

Test that we check if a user exists before creating a user

test_user_alias_already_exists(mock_import_user: MagicMock)

When signing up make sure we’re not using a username on a shared domain

test_user_using_reserved_emails(_mock_import_user: MagicMock)

Test to ensure that a user does not use a reserved username

test_alias_already_exists(mock_import_user: MagicMock)

Test that we check if a alias exists before creating a user

test_passwords_are_empty(mock_import_user: MagicMock)

Test that we check if passwords exist

test_import_errors_propagate(mock_import_user: MagicMock)

Test to make sure keycloak import user errors propagate to the frontend via messages

class thunderbird_accounts.authentication.tests.test_api.CanISignUpTestcase(methodName='runTest')[source]

Bases: APITestCase

setUp()[source]

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

class thunderbird_accounts.authentication.tests.test_api.CreateTestAllowListEntryTestCase(methodName='runTest')[source]

Bases: APITestCase

setUp()[source]

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

class thunderbird_accounts.authentication.tests.test_api.WaffleFlagsTestcase(methodName='runTest')[source]

Bases: APITestCase

setUp()[source]

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

class thunderbird_accounts.authentication.tests.test_api.ActiveSessionsTestcase(methodName='runTest')[source]

Bases: APITestCase

setUp()[source]

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

class thunderbird_accounts.authentication.tests.test_api.ConnectedAppsTestcase(methodName='runTest')[source]

Bases: APITestCase

setUp()[source]

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