thunderbird_accounts.subscription.tests.test_views

Classes

ActiveSubscriptionRequiredViewTestCase([...])

PaddleCheckoutIsDoneTestCase([methodName])

PaddleInformationTestCase([methodName])

PaddleTransactionCompleteCase([methodName])

class thunderbird_accounts.subscription.tests.test_views.PaddleCheckoutIsDoneTestCase(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

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

set_paddle_transaction_id()[source]

This actually tests set_paddle_transaction_id too!

test_no_tx_id_in_session()

This route requires a transaction id in their session. So if they don’t have a transaction id, we’ll respond accordingly.

test_no_tx_in_db()

This route should still return correctly (as draft) if there’s no transaction in our db. We should also ensure IS_DEV=False does not call Paddle.

test_user_payment_already_being_verified()

This route shouldn’t run and instead return PAID if we’re awaiting the Paddle webhook. Additionally we don’t set a transaction id here because we explicitly remove it when we set the awaiting payment verification flag.

test_transaction_found_but_not_doneish()

We found the transaction but it’s not done enough for us to consider it done. We should also ensure IS_DEV=False does not call Paddle.

class thunderbird_accounts.subscription.tests.test_views.PaddleInformationTestCase(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

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

class thunderbird_accounts.subscription.tests.test_views.PaddleTransactionCompleteCase(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

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

set_paddle_transaction_session_data(payment_type)[source]

This actually tests set_paddle_transaction_id too!

test_transaction_found_and_is_not_doneish_by_being_ready()

We found the transaction but it’s doneish (status=READY). This shouldn’t do anything!

We should also ensure IS_DEV=False does not call Paddle or the fake webhook task.

test_transaction_found_and_is_doneish_by_being_paid()

We found the transaction but it’s doneish (status=PAID). This should trigger payment verification and remove txid from session.

We should also ensure IS_DEV=False does not call Paddle or the fake webhook task.

test_transaction_found_and_is_doneish_by_being_completed()

We found the transaction but it’s doneish (status=COMPLETED). This should trigger payment verification and remove txid from session.

We should also ensure IS_DEV=False does not call Paddle or the fake webhook task.

test_transaction_found_and_is_doneish_by_being_paid_popup_popup_edition()

We found the transaction but it’s doneish (status=PAID). This should trigger payment verification and remove txid from session.

We should also ensure IS_DEV=False does not call Paddle or the fake webhook task.

test_transaction_found_and_is_doneish_by_being_completed_popup_edition()

We found the transaction but it’s doneish (status=COMPLETED). This should trigger payment verification and remove txid from session.

We should also ensure IS_DEV=False does not call Paddle or the fake webhook task.

class thunderbird_accounts.subscription.tests.test_views.ActiveSubscriptionRequiredViewTestCase(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

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