Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Pep8
Michal Ociepka6ff5beb50215
diff --git a/cart/__init__.py b/cart/__init__.pyindex 5bea775014..094cf851d6 100755--- a/cart/__init__.py+++ b/cart/__init__.py@@ -1,12 +1,11 @@-from delivery import DummyShipping, DigitalDelivery-from django.conf import settings-from django.utils.translation import ugettextfrom itertools import groupby-from prices import Price-from product.models import StockedProduct, DigitalShip++from django.utils.translation import ugettextfrom satchless import cart-from satchless.item import Item, ItemLine, ItemSet, Partitioner-import datetime+from satchless.item import ItemSet, Partitioner++from delivery import DummyShipping, DigitalDelivery+from product.models import StockedProduct, DigitalShipclass BaseGroup(list, ItemSet):@@ -127,8 +126,7 @@ class Cart(cart.Cart):Raises exception when product has stock and user insert too bigquantity.'''- if (isinstance(product, StockedProduct) and- quantity > product.stock):+ if isinstance(product, StockedProduct) and quantity > product.stock:raise InsufficientStockException(product)return super(Cart, self).check_quantity(product, quantity, data)diff --git a/checkout/tests/__init__.py b/checkout/tests/__init__.pyindex c7450fbef4..79417f858a 100644--- a/checkout/tests/__init__.py+++ b/checkout/tests/__init__.py@@ -143,5 +143,3 @@ class TestShippingStep(TestCase):step.save()self.assertEqual(Address.objects.count(), 0,'No addresses in database expected')--