From ac10ea4ee895cdc087ab72148455c203fb04e142 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Thu, 7 Apr 2016 10:19:18 +1000 Subject: [PATCH] s/cart_controller_helper/controller_helpers/ --- ...art_controller_helper.py => controller_helpers.py} | 0 registrasion/tests/test_cart.py | 2 +- registrasion/tests/test_ceilings.py | 2 +- registrasion/tests/test_enabling_condition.py | 2 +- registrasion/tests/test_invoice.py | 11 +++++++++-- registrasion/tests/test_refund.py | 2 +- registrasion/tests/test_voucher.py | 2 +- 7 files changed, 14 insertions(+), 7 deletions(-) rename registrasion/tests/{cart_controller_helper.py => controller_helpers.py} (100%) diff --git a/registrasion/tests/cart_controller_helper.py b/registrasion/tests/controller_helpers.py similarity index 100% rename from registrasion/tests/cart_controller_helper.py rename to registrasion/tests/controller_helpers.py diff --git a/registrasion/tests/test_cart.py b/registrasion/tests/test_cart.py index d47d659e..10ba10d2 100644 --- a/registrasion/tests/test_cart.py +++ b/registrasion/tests/test_cart.py @@ -10,7 +10,7 @@ from django.test import TestCase from registrasion import models as rego from registrasion.controllers.product import ProductController -from cart_controller_helper import TestingCartController +from controller_helpers import TestingCartController from patch_datetime import SetTimeMixin UTC = pytz.timezone('UTC') diff --git a/registrasion/tests/test_ceilings.py b/registrasion/tests/test_ceilings.py index f8481fea..c5664481 100644 --- a/registrasion/tests/test_ceilings.py +++ b/registrasion/tests/test_ceilings.py @@ -3,7 +3,7 @@ import pytz from django.core.exceptions import ValidationError -from cart_controller_helper import TestingCartController +from controller_helpers import TestingCartController from test_cart import RegistrationCartTestCase from registrasion import models as rego diff --git a/registrasion/tests/test_enabling_condition.py b/registrasion/tests/test_enabling_condition.py index 5d0e410c..d977cc5c 100644 --- a/registrasion/tests/test_enabling_condition.py +++ b/registrasion/tests/test_enabling_condition.py @@ -4,7 +4,7 @@ from django.core.exceptions import ValidationError from registrasion import models as rego from registrasion.controllers.category import CategoryController -from cart_controller_helper import TestingCartController +from controller_helpers import TestingCartController from registrasion.controllers.product import ProductController from test_cart import RegistrationCartTestCase diff --git a/registrasion/tests/test_invoice.py b/registrasion/tests/test_invoice.py index 19332392..080ca008 100644 --- a/registrasion/tests/test_invoice.py +++ b/registrasion/tests/test_invoice.py @@ -5,7 +5,7 @@ from decimal import Decimal from django.core.exceptions import ValidationError from registrasion import models as rego -from cart_controller_helper import TestingCartController +from controller_helpers import TestingCartController from registrasion.controllers.invoice import InvoiceController from test_cart import RegistrationCartTestCase @@ -197,4 +197,11 @@ class InvoiceTestCase(RegistrationCartTestCase): def test_cannot_generate_blank_invoice(self): current_cart = TestingCartController.for_user(self.USER_1) with self.assertRaises(ValidationError): - InvoiceController.for_cart(current_cart.cart) + invoice_1 = InvoiceController.for_cart(current_cart.cart) + + # TODO: test partially paid invoice cannot be void until payments + # are refunded + + # TODO: test overpaid invoice results in credit note + + # TODO: test credit note generation more generally diff --git a/registrasion/tests/test_refund.py b/registrasion/tests/test_refund.py index bde25929..e0b6c681 100644 --- a/registrasion/tests/test_refund.py +++ b/registrasion/tests/test_refund.py @@ -1,6 +1,6 @@ import pytz -from cart_controller_helper import TestingCartController +from controller_helpers import TestingCartController from registrasion.controllers.invoice import InvoiceController from test_cart import RegistrationCartTestCase diff --git a/registrasion/tests/test_voucher.py b/registrasion/tests/test_voucher.py index a8bc6b00..443ce1d7 100644 --- a/registrasion/tests/test_voucher.py +++ b/registrasion/tests/test_voucher.py @@ -6,7 +6,7 @@ from django.core.exceptions import ValidationError from django.db import IntegrityError from registrasion import models as rego -from cart_controller_helper import TestingCartController +from controller_helpers import TestingCartController from registrasion.controllers.invoice import InvoiceController from test_cart import RegistrationCartTestCase