thunderbird_accounts.authentication.tests.test_api

Classes

SignUpTestcase([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_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_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