Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Skip product discounts
Adam Bogdal7a78be92f57b
diff --git a/saleor/cart/tests.py b/saleor/cart/tests.pyindex 377841e618..46b1a875c3 100755--- a/saleor/cart/tests.py+++ b/saleor/cart/tests.py@@ -1,6 +1,7 @@from __future__ import unicode_literalsfrom django.test import TestCase+from mock import MagicMock, patchfrom prices import Pricefrom satchless.item import InsufficientStockfrom satchless.cart import CartLine@@ -9,7 +10,8 @@ from . import Cart, BaseGroup, CartPartitionerfrom .forms import AddToCartForm, ReplaceCartLineForm, \ReplaceCartLineFormSetfrom ..delivery import BaseDelivery-from ..product.models import Product, StockedProduct, PhysicalProduct+from ..product.models import (Product, StockedProduct, PhysicalProduct,+ FixedProductDiscount)__all__ = ['CartTest', 'GroupTest', 'AddToCartFormTest']@@ -78,7 +80,8 @@ class CartPartitionerTest(TestCase):def setUp(self):self.cart = Cart()- def test_total_price_including_custom_delivery_method(self):+ @patch.object(FixedProductDiscount, 'objects')+ def test_total_price_including_custom_delivery_method(self, mock_manager):self.cart.add(stock_product, 1)items = CartPartitioner(self.cart)for group in items: