thunderbird_accounts.authentication.tests

Classes

AccountsOIDCBackendTestCase([methodName])

AdminCreateUserTestCase([methodName])

AdminDeleteUserTestCase([methodName])

Tests the admin user delete action.

AdminUpdateUserTestcase([methodName])

Tests the admin's user update form.

LoginRequiredTestCase([methodName])

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

Bases: TestCase

setUp()[source]

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

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

Bases: TestCase

Tests the admin’s user update form. We’re mainly trying to make sure updates hit Keycloak as well.

setUp()[source]

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

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

Bases: TestCase

Tests the admin user delete action. This is just a function/unit test as there’s no form involved here.

setUp()[source]

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

test_success(mock_requests: MagicMock, mock_delete_principal: MagicMock)

Tests the full deletion flow: 1. Delete the User model. 2. Send a delete request to Keycloak to remove their login. 3. Send a delete request to Stalwart to remove their email/inbox.

test_success_without_stalwart_account(mock_requests: MagicMock, mock_delete_principal: MagicMock)

Tests a partial deletion flow since the user does not have a Stalwart email/inbox setup. 1. Delete the User model. 2. Send a delete request to Keycloak to remove their login. 3. Make sure we didn’t send anything to Stalwart

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

Bases: TestCase

setUp()[source]

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

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

Bases: TestCase