example_checkout.tests package¶
Submodules¶
example_checkout.tests.factories module¶
example_checkout.tests.test_checkout module¶
example_checkout.tests.test_checkout_invoice module¶
example_checkout.tests.test_management_command module¶
example_checkout.tests.test_object_payment_plan module¶
-
example_checkout.tests.test_object_payment_plan.
test_fail_or_request
()[source]¶ Payment plans which have an instalment in the fail or request state.
-
example_checkout.tests.test_object_payment_plan.
test_fail_or_request_duplicate
()[source]¶ Payment plans which have an instalment in the fail or request state.
-
example_checkout.tests.test_object_payment_plan.
test_instalments_due_exclude_by_due_date
(state)[source]¶
-
example_checkout.tests.test_object_payment_plan.
test_outstanding_payment_plans_exclude_deleted
()[source]¶
-
example_checkout.tests.test_object_payment_plan.
test_outstanding_payment_plans_exclude_success
()[source]¶
-
example_checkout.tests.test_object_payment_plan.
test_outstanding_payment_plans_filter_two
()[source]¶
example_checkout.tests.test_object_payment_plan_instalment module¶
-
example_checkout.tests.test_object_payment_plan_instalment.
test_can_charge_deposit_not_pending
()[source]¶
-
example_checkout.tests.test_object_payment_plan_instalment.
test_can_charge_deposit_pending
()[source]¶
-
example_checkout.tests.test_object_payment_plan_instalment.
test_can_charge_due_not_yet
()[source]¶ The payment is not due yet, so can we charge?
PJK 18/03/2016 Changing the behaviour of the
checkout_can_charge
method onObjectPaymentPlanInstalment
. We want to allow a member of staff to charge the card for payments which are not yet due.The automated routine uses the
due
method so it shouldn’t take payments early.
-
example_checkout.tests.test_object_payment_plan_instalment.
test_can_charge_pending_plan_deleted
()[source]¶
-
example_checkout.tests.test_object_payment_plan_instalment.
test_create_instalments_first_of_month
(deposit_due_date)[source]¶ Test create instalments.
Note
The instalment dates are calculated from
now
not from the deposit due date: https://www.kbsoftware.co.uk/crm/ticket/3604/
-
example_checkout.tests.test_object_payment_plan_instalment.
test_create_instalments_first_of_month_after_15th
(deposit_due_date)[source]¶ Test create instalments.
Note
The instalment dates are calculated from
now
not from the deposit due date: https://www.kbsoftware.co.uk/crm/ticket/3604/
-
example_checkout.tests.test_object_payment_plan_instalment.
test_current_instalment_deposit
()[source]¶
-
example_checkout.tests.test_object_payment_plan_instalment.
test_due_within_date_range
()[source]¶ We must only retry payments which are within x days of the due date.
-
example_checkout.tests.test_object_payment_plan_instalment.
test_reminder
()[source]¶ Automated Payment Reminder.
- I think I need to get
outstanding_payment_plans
(ObjectPaymentPlanManager
) This doesn’t seem to worry about any dates. - We can check the mail tables to see if we have already reminded the user this month.
- It would be good if the task could be run every day, but to do that I
will need to check to see if the payment is due within the next 7 days.
I can do that by checking the
due
field. - I need to make sure we don’t include deposit records in this list.
- I think I need to get
example_checkout.tests.test_payment_plan module¶
example_checkout.tests.test_payment_run module¶
-
example_checkout.tests.test_payment_run.
test_process_payments_fail
(mocker)[source]¶ Process payments.
example_checkout.tests.test_payment_run_item module¶
example_checkout.tests.test_sales_ledger module¶
example_checkout.tests.test_view module¶
-
class
example_checkout.tests.test_view.
TestView
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
Session variables difficult to test ref: http://stackoverflow.com/questions/4453764/how-do-i-modify-the-session-in-the-django-test-framework
example_checkout.tests.test_view_checkout_mixin module¶
example_checkout.tests.test_view_checkout_success_mixin module¶
example_checkout.tests.test_view_customer module¶
example_checkout.tests.test_view_object_payment_plan_instalment module¶
example_checkout.tests.test_view_perm module¶
-
example_checkout.tests.test_view_perm.
test_object_payment_plan_instalment_audit_list
(perm_check)[source]¶