thunderbird_accounts.authentication.tests
Classes
|
|
|
|
|
Tests the admin user delete action. |
|
Tests the admin's user update form. |
|
- class thunderbird_accounts.authentication.tests.AdminCreateUserTestCase(methodName='runTest')[source]
Bases:
TestCase
- 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.
- 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.
- 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