Did I find the right examples for you? yes no

All Samples(42)  |  Call(42)  |  Derive(0)  |  Import(0)

src/l/f/lfs-HEAD/cart/views.py   lfs(Download)
    except ObjectDoesNotExist:
        cart_item = CartItem.objects.create(
            cart=cart, product=product, amount=quantity)
        session_cart_items.append(cart_item)
    else:

src/d/j/django-lfs-0.7.7/lfs/cart/tests.py   django-lfs(Download)
 
        self.cart = Cart.objects.create()
        CartItem.objects.create(cart=self.cart, product=self.p1, amount=1)
        CartItem.objects.create(cart=self.cart, product=self.p2, amount=1)
        CartItem.objects.create(cart=self.cart, product=self.p3, amount=1)
 
        self.cart = Cart.objects.create()
        self.item = CartItem.objects.create(cart=self.cart, product=self.p1, amount=1)
 
    def test_get_properties(self):

src/d/j/django-lfs-HEAD/lfs/cart/tests.py   django-lfs(Download)
 
        self.cart = Cart.objects.create()
        CartItem.objects.create(cart=self.cart, product=self.p1, amount=1)
        CartItem.objects.create(cart=self.cart, product=self.p2, amount=1)
        CartItem.objects.create(cart=self.cart, product=self.p3, amount=1)
 
        self.cart = Cart.objects.create()
        self.item = CartItem.objects.create(cart=self.cart, product=self.p1, amount=1)
 
    def test_get_properties(self):

src/d/j/django-lfs-HEAD/lfs/checkout/tests/test_addresses.py   django-lfs(Download)
 
        item = CartItem.objects.create(
            cart=cart,
            product=p1,
            amount=2,
        )
 
        item = CartItem.objects.create(
            cart=cart,
 
        item = CartItem.objects.create(
            cart=cart,
            product=p1,
            amount=2,
        )
 
        item = CartItem.objects.create(
            cart=cart,

src/d/j/django-lfs-0.7.7/lfs/shipping/tests.py   django-lfs(Download)
 
        # Cart price is still under 10 - sms1 is not valid
        CartItem.objects.create(cart=cart, product=self.p1, amount=1)
        update_cart_cache(cart)
 
        sms = utils.get_valid_shipping_methods(request)
        self.assertEqual(len(sms), 1)
 
        # Cart price is greater than 10.0 now - sms1 is valid
        CartItem.objects.create(cart=cart, product=self.p2, amount=1)
        # No we add some items to the cart
        cart = cart_utils.get_or_create_cart(self.request)
        CartItem.objects.create(cart=cart, product=self.p1, amount=2)
        update_cart_cache(cart)
 

src/d/j/django-lfs-HEAD/lfs/shipping/tests.py   django-lfs(Download)
 
        # Cart price is still under 10 - sms1 is not valid
        CartItem.objects.create(cart=cart, product=self.p1, amount=1)
        update_cart_cache(cart)
 
        sms = utils.get_valid_shipping_methods(request)
        self.assertEqual(len(sms), 1)
 
        # Cart price is greater than 10.0 now - sms1 is valid
        CartItem.objects.create(cart=cart, product=self.p2, amount=1)
        # No we add some items to the cart
        cart = cart_utils.get_or_create_cart(self.request)
        CartItem.objects.create(cart=cart, product=self.p1, amount=2)
        update_cart_cache(cart)
 

src/d/j/django-lfs-0.7.7/lfs/checkout/tests/test_checkout.py   django-lfs(Download)
 
        self.item1 = CartItem.objects.create(
            cart=cart,
            product=p1,
            amount=2,
        )
 
        self.item2 = CartItem.objects.create(
            cart=cart,

src/d/j/django-lfs-0.7.7/lfs/checkout/tests/test_addresses.py   django-lfs(Download)
 
        item = CartItem.objects.create(
            cart=cart,
            product=p1,
            amount=2,
        )
 
        item = CartItem.objects.create(
            cart=cart,

src/d/j/django-lfs-HEAD/lfs/checkout/tests/test_checkout.py   django-lfs(Download)
 
        self.item1 = CartItem.objects.create(
            cart=cart,
            product=p1,
            amount=2,
        )
 
        self.item2 = CartItem.objects.create(
            cart=cart,

src/d/j/django-lfs-0.7.7/lfs/voucher/tests.py   django-lfs(Download)
 
        self.cart = Cart.objects.create()
        CartItem.objects.create(cart=self.cart, product=self.p1, amount=1)
        CartItem.objects.create(cart=self.cart, product=self.p2, amount=1)
 

  1 | 2  Next