thunderbird_accounts.subscription.tests.test_tasks

Classes

PaddleTestCase([methodName])

Base class for Paddle/Celery task unit tests.

PaddleWebhookViewTestCase([methodName])

Test the actual webhook route

ProductCreatedTaskTestCase([methodName])

ProductUpdatedTaskTestCase([methodName])

SubscriptionCreatedTaskTestCase([methodName])

SubscriptionUpdatedTaskTestCase([methodName])

TransactionCreatedTaskTestCase([methodName])

TransactionUpdatedTaskTestCase([methodName])

class thunderbird_accounts.subscription.tests.test_tasks.PaddleWebhookViewTestCase(methodName='runTest')[source]

Bases: APITestCase

Test the actual webhook route

setUp()[source]

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

test_empty_webhook()

Ensure a webhook that doesn’t have any POST data errors out with an unexpected behaviour error.

test_empty_occurred_at()

Ensure a webhook will raise an unexpected behaviour error if there’s occurred at.

test_success()

Test the minimum amount of data needed to be passed to celery.

test_draft_transactions_are_ignored()

Since this transaction.created event is a draft we ignore it.

test_draft_transactions_arent_ignored_if_they_are_updated()

While we ignore transaction.created with the status of draft, we shouldn’t ignore the unlikely but possible scenario that a transaction updates to a draft.

class thunderbird_accounts.subscription.tests.test_tasks.PaddleTestCase(methodName='runTest')[source]

Bases: TestCase

Base class for Paddle/Celery task unit tests.

setUp()[source]

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

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

class thunderbird_accounts.subscription.tests.test_tasks.TransactionCreatedTaskTestCase(methodName='runTest')[source]

Bases: PaddleTestCase

test_transaction_already_exists()[source]

We’re testing if the transaction already exists here.

class thunderbird_accounts.subscription.tests.test_tasks.TransactionUpdatedTaskTestCase(methodName='runTest')[source]

Bases: TransactionCreatedTaskTestCase

test_transaction_already_exists()[source]

This isn’t needed in context of TransactionUpdated, but we inherit it so we need to stub it out.

test_transaction_out_of_date()[source]

We’re testing if the transaction is out of date here.

class thunderbird_accounts.subscription.tests.test_tasks.SubscriptionCreatedTaskTestCase(methodName='runTest')[source]

Bases: PaddleTestCase

class thunderbird_accounts.subscription.tests.test_tasks.SubscriptionUpdatedTaskTestCase(methodName='runTest')[source]

Bases: SubscriptionCreatedTaskTestCase

test_subscription_already_exists()[source]

Not needed for update webhook

test_subscription_out_of_date()[source]

We’re testing if the transaction is out of date here.

class thunderbird_accounts.subscription.tests.test_tasks.ProductCreatedTaskTestCase(methodName='runTest')[source]

Bases: PaddleTestCase

test_already_exists()[source]

We’re testing if the transaction already exists here.

class thunderbird_accounts.subscription.tests.test_tasks.ProductUpdatedTaskTestCase(methodName='runTest')[source]

Bases: ProductCreatedTaskTestCase

test_already_exists()[source]

This isn’t needed in context of ProductUpdated, but we inherit it so we need to stub it out.

test_out_of_date()[source]

We’re testing if the transaction is out of date here.