Commit f1bfd99b by Clinton Blackburn

Boosted Code Coverage

- Ignoring files that cannot be covered
- Removed dead code

XCOM-193
parent 0f35b042
......@@ -8,3 +8,5 @@ omit = ecommerce/settings*
*test*
*static*
*templates*
ecommerce/extensions/checkout/apps.py
ecommerce/extensions/dashboard/refunds/config.py
......@@ -15,34 +15,6 @@ class Order(AbstractOrder):
""" Returns a boolean indicating if order is eligible to retry fulfillment. """
return self.status == ORDER.FULFILLMENT_ERROR
@classmethod
def check_order_total(cls, order_num, auth_amount, auth_currency):
"""
Verify that the auth amount given matches the total price of an order and that the currencies
are also correct.
Args:
order_num (str): order number for the given order
auth_amount (Decimal): the amount that we would like to verify is correct
auth_currency (str): the currency of the amount we'd like to verify is correct
Returns:
True if the amount and currency matches
False otherwise
Raises:
DoesNotExist: if there is no order that matches the number given
"""
order = Order.objects.get(number=order_num)
if order.total_excl_tax == auth_amount and order.currency == auth_currency:
return True
else:
# Set the status to indicate that there was an error.
order.set_status(ORDER.PAYMENT_ERROR)
return False
class PaymentEvent(AbstractPaymentEvent):
processor_name = models.CharField(_("Payment Processor"), max_length=32, blank=True, null=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment