thunderbird_accounts.mail.tests.test_middleware

Classes

FixMissingArchivesFolderMiddlewareTestCase([...])

class thunderbird_accounts.mail.tests.test_middleware.FixMissingArchivesFolderMiddlewareTestCase(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

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

test_freshly_subscribed_user(tiny_jmap_mock: MagicMock)

A fresh user who has a subscription and a stalwart account should have their archive folder checked and successfully created

test_already_verified_account_isnt_checked_again(tiny_jmap_mock: MagicMock)

A user with a verified archive folder shouldn’t have any jmap calls sent

test_unauthenticated_user_shouldnt_have_fix_archives_folder_called(tiny_jmap_mock: MagicMock, fix_archives_folder_mock: MagicMock)

A unauthenticated user shouldn’t have fix archives folder called

test_authenticated_but_not_subscribed_user_shouldnt_have_fix_archives_folder_called(tiny_jmap_mock: MagicMock, fix_archives_folder_mock: MagicMock)

An authenticated but non-subscribed user shouldn’t ahve fix archives folder called

test_non_active_subscription_shouldnt_have_fix_archives_folder_called(tiny_jmap_mock: MagicMock, fix_archives_folder_mock: MagicMock)

An authenticated user with a non-active subscription shouldn’t ahve fix archives folder called

test_malformed_jmap_response_shouldnt_crash_the_request(tiny_jmap_mock: MagicMock)

An authenticated user with a non-active subscription shouldn’t ahve fix archives folder called