Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias alias ImportFrom alias identifier ImportFrom alias alias ImportFrom alias alias ClassDef bases NameLoad body Assign NameStore Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list Call NameLoad Str keyword Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list Call NameLoad Str keyword Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list Call NameLoad Str keyword Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr decorator_list Call NameLoad Str keyword NameLoad keyword Call NameLoad keyword Str Call NameLoad Str keyword Call NameLoad keyword NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad Str keyword Call NameLoad keyword Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr decorator_list Call NameLoad Str keyword NameLoad keyword Call NameLoad keyword Str decorator_list ClassDef bases NameLoad body Assign NameStore Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad Str keyword Dict Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list Call NameLoad Str keyword NameLoad keyword Call NameLoad keyword Str Call NameLoad Str keyword Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword Dict Str Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str decorator_list Call NameLoad Str keyword NameLoad keyword Call NameLoad keyword Str Call NameLoad Str keyword Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str decorator_list Call NameLoad Str keyword NameLoad keyword Call NameLoad keyword Str Call NameLoad Str keyword Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Index Str decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Index Str decorator_list Call NameLoad Str keyword Call NameLoad keyword Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword Str keyword Str keyword Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Index Str decorator_list Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Index Str decorator_list Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list Call NameLoad Str keyword NameLoad keyword Call NameLoad keyword Str keyword Call NameLoad Num Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad keyword Call NameLoad keyword Str keyword Call NameLoad Num Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad keyword Call NameLoad keyword Str keyword Call NameLoad Num Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad keyword Call NameLoad keyword Str keyword Call NameLoad Num Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list Call NameLoad Str keyword NameLoad keyword Call NameLoad keyword Str keyword Call NameLoad Num Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Index Str decorator_list Call NameLoad Str keyword NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str keyword Call NameLoad keyword Str Call NameLoad Str keyword Call NameLoad keyword AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword Call NameLoad keyword Str Call NameLoad Str keyword Call NameLoad keyword AttributeLoad NameLoad attr decorator_list
N/A N/A 
.. module:: dj-stripe.tests.test_views
   :synopsis: dj-stripe View Tests.

.. moduleauthor:: Daniel Greenfeld (@pydanny)
.. moduleauthor:: Alex Kavanaugh (@kavdev)

 decimal Decimal django.contrib.auth get_user_model django.core.urlresolvers reverse django.test.client RequestFactory django.test.testcases TestCase N/A stripe mock patch PropertyMock djstripe settings djstripe_settings djstripe.models Customer CurrentSubscription djstripe.views ChangeCardView HistoryView AccountViewTest N/A TestCase N/A N/A fake_stripe_customer_id cus_xxx1234567890 setUp N/A N/A self N/A N/A N/A N/A self url N/A reverse djstripe:account N/A N/A self user N/A N/A N/A N/A get_user_model objects create_user username testuser email test@example.com password 123 N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser password 123 N/A test_autocreate_customer N/A N/A self stripe_create_customer_mock N/A N/A N/A N/A N/A self assertEqual N/A N/A N/A Customer objects count 0 N/A response N/A N/A N/A self client get N/A self url N/A N/A N/A stripe_create_customer_mock assert_called_once_with email N/A N/A self user email N/A N/A N/A self assertEqual N/A self fake_stripe_customer_id N/A N/A N/A response context N/A customer stripe_id N/A N/A N/A self assertEqual N/A self user N/A N/A N/A response context N/A customer subscriber N/A N/A N/A self assertEqual N/A N/A N/A Customer objects count 1 N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id fake_stripe_customer_id test_plan_list_context N/A N/A self stripe_create_customer_mock N/A N/A N/A response N/A N/A N/A self client get N/A self url N/A N/A N/A self assertEqual N/A djstripe_settings PLAN_LIST N/A N/A response context N/A plans N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id fake_stripe_customer_id test_subscription_context N/A N/A self stripe_create_customer_mock N/A N/A N/A response N/A N/A N/A self client get N/A self url N/A N/A N/A self assertEqual None N/A N/A response context N/A subscription N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id fake_stripe_customer_id test_subscription_context_with_plan N/A N/A self djstripe_customer_customer_subscription_mock stripe_create_customer_mock N/A N/A N/A response N/A N/A N/A self client get N/A self url N/A N/A N/A self assertEqual test_plan_07 N/A N/A N/A response context N/A subscription plan N/A N/A patch djstripe.models.Customer.current_subscription new_callable PropertyMock return_value N/A CurrentSubscription plan test_plan_07 N/A patch stripe.Customer.create return_value N/A PropertyMock id fake_stripe_customer_id N/A ChangeCardViewTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self url N/A reverse djstripe:change_card N/A N/A self user N/A N/A N/A N/A get_user_model objects create_user username testuser email test@example.com password 123 N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser password 123 N/A test_get N/A N/A self stripe_create_customer_mock N/A N/A N/A response N/A N/A N/A self client get N/A self url N/A N/A N/A self assertEqual 200 N/A response status_code N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 test_post_new_card N/A N/A self stripe_customer_mock update_card_mock send_invoice_mock retry_unpaid_invoices_mock N/A N/A N/A N/A N/A N/A self client post N/A self url N/A stripe_token alpha N/A N/A N/A update_card_mock assert_called_once_with N/A N/A self user customer alpha N/A N/A N/A send_invoice_mock assert_called_with N/A N/A self user customer N/A N/A N/A retry_unpaid_invoices_mock assert_called_once_with N/A N/A self user customer N/A N/A patch djstripe.models.Customer.retry_unpaid_invoices autospec True N/A patch djstripe.models.Customer.send_invoice autospec True N/A patch djstripe.models.Customer.update_card autospec True N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 test_post_change_card N/A N/A self stripe_customer_mock update_card_mock send_invoice_mock retry_unpaid_invoices_mock N/A N/A N/A N/A N/A N/A Customer objects get_or_create subscriber N/A self user card_fingerprint 4449 N/A N/A N/A self assertEqual 1 N/A N/A N/A Customer objects count N/A N/A N/A N/A self client post N/A self url N/A stripe_token beta N/A N/A N/A self assertEqual 1 N/A N/A N/A Customer objects count N/A N/A N/A update_card_mock assert_called_once_with N/A N/A self user customer beta N/A N/A N/A self assertFalse N/A send_invoice_mock called N/A N/A N/A retry_unpaid_invoices_mock assert_called_once_with N/A N/A self user customer N/A N/A patch djstripe.models.Customer.retry_unpaid_invoices autospec True N/A patch djstripe.models.Customer.send_invoice autospec True N/A patch djstripe.models.Customer.update_card autospec True N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 test_post_card_error N/A N/A self stripe_create_customer_mock update_card_mock N/A N/A N/A N/A update_card_mock side_effect N/A N/A stripe StripeError An error occurred while processing your card. N/A response N/A N/A N/A self client post N/A self url N/A stripe_token pie N/A N/A N/A update_card_mock assert_called_once_with N/A N/A self user customer pie N/A N/A N/A self assertIn stripe_error N/A response context N/A N/A N/A self assertIn An error occurred while processing your card. N/A N/A response context N/A stripe_error N/A N/A patch djstripe.models.Customer.update_card autospec True N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 test_post_no_card N/A N/A self stripe_create_customer_mock update_card_mock N/A N/A N/A N/A update_card_mock side_effect N/A N/A stripe StripeError Invalid source object: N/A response N/A N/A N/A self client post N/A self url N/A N/A N/A update_card_mock assert_called_once_with N/A N/A self user customer None N/A N/A N/A self assertIn stripe_error N/A response context N/A N/A N/A self assertIn Invalid source object: N/A N/A response context N/A stripe_error N/A N/A patch djstripe.models.Customer.update_card autospec True N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 test_get_object N/A N/A self stripe_create_customer_mock N/A N/A N/A view_instance N/A ChangeCardView N/A request N/A RequestFactory N/A N/A request user N/A self user N/A N/A view_instance request request N/A object_a N/A N/A view_instance get_object N/A object_b N/A N/A view_instance get_object N/A customer_instance N/A N/A N/A Customer objects get subscriber N/A self user N/A N/A N/A self assertEqual customer_instance object_a N/A N/A N/A self assertEqual object_a object_b N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 test_get_success_url N/A N/A self N/A N/A N/A view_instance N/A ChangeCardView N/A url N/A N/A view_instance get_post_success_url N/A N/A N/A self assertEqual N/A reverse djstripe:account url N/A N/A HistoryViewTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self url N/A reverse djstripe:history N/A N/A self user N/A N/A N/A N/A get_user_model objects create_user username testuser email test@example.com password 123 N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser password 123 N/A test_get_object N/A N/A self stripe_create_customer_mock N/A N/A N/A view_instance N/A HistoryView N/A request N/A RequestFactory N/A N/A request user N/A self user N/A N/A view_instance request request N/A object_a N/A N/A view_instance get_object N/A N/A N/A stripe_create_customer_mock assert_called_once_with email N/A N/A self user email N/A customer_instance N/A N/A N/A Customer objects get subscriber N/A self user N/A N/A N/A self assertEqual customer_instance object_a N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 N/A SyncHistoryViewTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self url N/A reverse djstripe:sync_history N/A N/A self user N/A N/A N/A N/A get_user_model objects create_user username testuser email test@example.com password 123 N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser password 123 N/A test_post N/A N/A self sync_subscriber_mock N/A N/A N/A response N/A N/A N/A self client post N/A self url N/A N/A N/A sync_subscriber_mock assert_called_once_with N/A self user N/A N/A N/A self assertEqual pie N/A N/A N/A response context N/A customer subscriber N/A N/A patch djstripe.views.sync_subscriber new_callable PropertyMock return_value N/A PropertyMock subscriber pie N/A ConfirmFormViewTest N/A TestCase N/A N/A fake_stripe_customer_id cus_xxx1234567890 setUp N/A N/A self N/A N/A N/A N/A self plan test0 N/A N/A self url N/A reverse djstripe:confirm kwargs N/A plan N/A self plan N/A N/A self user N/A N/A N/A N/A get_user_model objects create_user username testuser email test@example.com password 123 N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser password 123 N/A test_get_form_valid N/A N/A self djstripe_customer_customer_subscription_mock stripe_create_customer_mock N/A N/A N/A response N/A N/A N/A self client get N/A self url N/A N/A N/A self assertEqual 200 N/A response status_code N/A N/A patch djstripe.models.Customer.current_subscription new_callable PropertyMock return_value N/A CurrentSubscription plan something-else N/A patch stripe.Customer.create return_value N/A PropertyMock id fake_stripe_customer_id test_get_form_unknown N/A N/A self djstripe_customer_customer_subscription_mock stripe_create_customer_mock N/A N/A N/A response N/A N/A N/A self client get N/A reverse djstripe:confirm kwargs N/A plan does-not-exist N/A N/A N/A self assertRedirects response N/A reverse djstripe:subscribe N/A N/A patch djstripe.models.Customer.current_subscription new_callable PropertyMock return_value N/A CurrentSubscription plan test0 N/A patch stripe.Customer.create return_value N/A PropertyMock id fake_stripe_customer_id test_get_form_invalid N/A N/A self djstripe_customer_customer_subscription_mock stripe_create_customer_mock N/A N/A N/A response N/A N/A N/A self client get N/A self url N/A N/A N/A self assertRedirects response N/A reverse djstripe:subscribe N/A N/A patch djstripe.models.Customer.current_subscription new_callable PropertyMock return_value N/A CurrentSubscription plan test0 N/A patch stripe.Customer.create return_value N/A PropertyMock id fake_stripe_customer_id test_post_valid N/A N/A self stripe_customer_mock update_card_mock subscribe_mock N/A N/A N/A N/A N/A self assertEqual 0 N/A N/A N/A Customer objects count N/A response N/A N/A N/A self client post N/A self url N/A plan stripe_token N/A self plan cake N/A N/A N/A self assertEqual 1 N/A N/A N/A Customer objects count N/A N/A N/A update_card_mock assert_called_once_with N/A N/A self user customer cake N/A N/A N/A subscribe_mock assert_called_once_with N/A N/A self user customer N/A self plan N/A N/A N/A self assertRedirects response N/A reverse djstripe:history N/A N/A patch djstripe.models.Customer.subscribe autospec True N/A patch djstripe.models.Customer.update_card autospec True N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 test_post_no_card N/A N/A self stripe_customer_mock update_card_mock subscribe_mock N/A N/A N/A N/A update_card_mock side_effect N/A N/A stripe StripeError Invalid source object: N/A response N/A N/A N/A self client post N/A self url N/A plan N/A self plan N/A N/A N/A self assertEqual 200 N/A response status_code N/A N/A N/A self assertIn form N/A response context N/A N/A N/A self assertIn Invalid source object: N/A N/A N/A N/A response context N/A form errors N/A __all__ N/A N/A patch djstripe.models.Customer.subscribe autospec True N/A patch djstripe.models.Customer.update_card autospec True N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 test_post_form_invalid N/A N/A self stripe_customer_mock N/A N/A N/A response N/A N/A N/A self client post N/A self url N/A N/A N/A self assertEqual 200 N/A response status_code N/A N/A N/A self assertIn plan N/A N/A N/A response context N/A form errors N/A N/A N/A self assertIn This field is required. N/A N/A N/A N/A response context N/A form errors N/A plan N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 N/A ChangePlanViewTest N/A TestCase N/A setUp N/A N/A self stripe_customer_mock N/A N/A N/A N/A self url N/A reverse djstripe:change_plan N/A N/A self user1 N/A N/A N/A N/A get_user_model objects create_user username testuser1 email test@example.com password 123 N/A N/A self user2 N/A N/A N/A N/A get_user_model objects create_user username testuser2 email test@example.com password 123 N/A N/A N/A Customer get_or_create subscriber N/A self user1 N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890_01 test_post_form_invalid N/A N/A self stripe_customer_mock N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser1 password 123 N/A response N/A N/A N/A self client post N/A self url N/A N/A N/A self assertEqual 200 N/A response status_code N/A N/A N/A self assertIn plan N/A N/A N/A response context N/A form errors N/A N/A N/A self assertIn This field is required. N/A N/A N/A N/A response context N/A form errors N/A plan N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 test_post_new_sub_no_proration N/A N/A self stripe_customer_mock N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser2 password 123 N/A response N/A N/A N/A self client post N/A self url N/A plan test0 N/A N/A N/A self assertEqual 200 N/A response status_code N/A N/A N/A self assertIn form N/A response context N/A N/A N/A self assertIn You must already be subscribed to a plan before you can change it. N/A N/A N/A N/A response context N/A form errors N/A __all__ N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890_02 test_change_sub_no_proration N/A N/A self subscribe_mock current_subscription_mock N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser1 password 123 N/A response N/A N/A N/A self client post N/A self url N/A plan test0 N/A N/A N/A self assertRedirects response N/A reverse djstripe:history N/A N/A N/A subscribe_mock assert_called_once_with N/A N/A self user1 customer test0 N/A N/A patch djstripe.models.Customer.current_subscription new_callable PropertyMock return_value N/A CurrentSubscription plan test amount N/A Decimal 25.0 N/A patch djstripe.models.Customer.subscribe autospec True test_change_sub_with_proration_downgrade N/A N/A self subscribe_mock current_subscription_mock proration_policy_mock N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser1 password 123 N/A response N/A N/A N/A self client post N/A self url N/A plan test0 N/A N/A N/A self assertRedirects response N/A reverse djstripe:history N/A N/A N/A subscribe_mock assert_called_once_with N/A N/A self user1 customer test0 N/A N/A patch djstripe.views.PRORATION_POLICY_FOR_UPGRADES return_value True N/A patch djstripe.models.Customer.current_subscription new_callable PropertyMock return_value N/A CurrentSubscription plan test amount N/A Decimal 25.0 N/A patch djstripe.models.Customer.subscribe autospec True test_change_sub_with_proration_upgrade N/A N/A self subscribe_mock current_subscription_mock proration_policy_mock N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser1 password 123 N/A response N/A N/A N/A self client post N/A self url N/A plan test2 N/A N/A N/A self assertRedirects response N/A reverse djstripe:history N/A N/A N/A subscribe_mock assert_called_once_with N/A N/A self user1 customer test2 prorate True N/A N/A patch djstripe.views.PRORATION_POLICY_FOR_UPGRADES return_value True N/A patch djstripe.models.Customer.current_subscription new_callable PropertyMock return_value N/A CurrentSubscription plan test amount N/A Decimal 25.0 N/A patch djstripe.models.Customer.subscribe autospec True test_change_sub_with_proration_same_plan N/A N/A self subscribe_mock current_subscription_mock proration_policy_mock N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser1 password 123 N/A response N/A N/A N/A self client post N/A self url N/A plan test N/A N/A N/A self assertRedirects response N/A reverse djstripe:history N/A N/A N/A subscribe_mock assert_called_once_with N/A N/A self user1 customer test N/A N/A patch djstripe.views.PRORATION_POLICY_FOR_UPGRADES return_value True N/A patch djstripe.models.Customer.current_subscription new_callable PropertyMock return_value N/A CurrentSubscription plan test amount N/A Decimal 25.0 N/A patch djstripe.models.Customer.subscribe autospec True test_change_sub_same_plan N/A N/A self subscribe_mock current_subscription_mock N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser1 password 123 N/A response N/A N/A N/A self client post N/A self url N/A plan test N/A N/A N/A self assertRedirects response N/A reverse djstripe:history N/A N/A N/A subscribe_mock assert_called_once_with N/A N/A self user1 customer test N/A N/A patch djstripe.models.Customer.current_subscription new_callable PropertyMock return_value N/A CurrentSubscription plan test amount N/A Decimal 25.0 N/A patch djstripe.models.Customer.subscribe autospec True test_change_sub_stripe_error N/A N/A self subscribe_mock N/A N/A N/A N/A subscribe_mock side_effect N/A N/A stripe StripeError No such plan: test_id_3 N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser1 password 123 N/A response N/A N/A N/A self client post N/A self url N/A plan test_deletion N/A N/A N/A self assertEqual 200 N/A response status_code N/A N/A N/A self assertIn form N/A response context N/A N/A N/A self assertIn No such plan: test_id_3 N/A N/A N/A N/A response context N/A form errors N/A __all__ N/A N/A patch djstripe.models.Customer.subscribe autospec True N/A CancelSubscriptionViewTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self url N/A reverse djstripe:cancel_subscription N/A N/A self user N/A N/A N/A N/A get_user_model objects create_user username testuser email test@example.com password 123 N/A N/A N/A self assertTrue N/A N/A N/A self client login username testuser password 123 N/A test_cancel_proration N/A N/A self cancel_subscription_mock stripe_create_customer_mock N/A N/A N/A response N/A N/A N/A self client post N/A self url N/A N/A N/A cancel_subscription_mock assert_called_once_with at_period_end N/A djstripe_settings CANCELLATION_AT_PERIOD_END N/A N/A N/A self assertRedirects response N/A reverse djstripe:account N/A N/A N/A self assertTrue N/A N/A N/A self user is_authenticated N/A N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 N/A patch djstripe.models.Customer.cancel_subscription return_value N/A CurrentSubscription status N/A CurrentSubscription STATUS_ACTIVE test_cancel_no_proration N/A N/A self cancel_subscription_mock stripe_create_customer_mock logout_mock N/A N/A N/A response N/A N/A N/A self client post N/A self url N/A N/A N/A cancel_subscription_mock assert_called_once_with at_period_end N/A djstripe_settings CANCELLATION_AT_PERIOD_END N/A N/A N/A self assertEqual N/A response status_code 302 N/A N/A N/A self assertTrue N/A logout_mock called N/A N/A patch djstripe.views.auth_logout autospec True N/A patch stripe.Customer.create return_value N/A PropertyMock id cus_xxx1234567890 N/A patch djstripe.models.Customer.cancel_subscription return_value N/A CurrentSubscription status N/A CurrentSubscription STATUS_CANCELLED N/A