Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove unused methods

Artur Smęt156e50ea58bb
diff --git a/saleor/cart/__init__.py b/saleor/cart/__init__.py
index 7ca0642a50..134006a6c6 100755
--- a/saleor/cart/__init__.py
+++ b/saleor/cart/__init__.py
@@ -61,8 +61,6 @@ class Cart(cart.Cart):
class SessionCart(cart.Cart):
'''
Serializable representation of cart.
- Parameters:
- variant - Instance of ProductVariant
'''
def __str__(self):
@@ -100,10 +98,3 @@ class SessionCart(cart.Cart):
def count(self):
return sum([item['quantity'] for item in self._state])
-
- def for_storage(self):
- cart_data = {
- 'items': self._state,
- 'modified': self.modified
- }
- return cart_data
\ No newline at end of file
diff --git a/saleor/cart/tests.py b/saleor/cart/tests.py
index d12f3e8f28..e336f49868 100755
--- a/saleor/cart/tests.py
+++ b/saleor/cart/tests.py
@@ -182,11 +182,3 @@ class SessionCartTest(TestCase):
def test_count(self):
self.cart.add(stock_product, quantity=5)
self.assertEqual(self.cart.count(), 5)
-
- def test_as_data(self):
- self.cart.add(stock_product, quantity=5)
- expected = {
- 'items': self.cart._state,
- 'modified': True
- }
- self.assertEqual(self.cart.for_storage(), expected)
\ No newline at end of file
diff --git a/saleor/product/models/variants.py b/saleor/product/models/variants.py
index 2ba2e00405..300cd45181 100644
--- a/saleor/product/models/variants.py
+++ b/saleor/product/models/variants.py
@@ -99,4 +99,4 @@ class ProductVariant(models.Model, Item):
'product_id': self.product.pk,
'variant_id': self.pk,
'unit_price': str(self.get_price_per_item().gross)
- }
\ No newline at end of file
+ }