Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(23)  |  Call(23)  |  Derive(0)  |  Import(0)
Default stock/price strategy that uses the first found stockrecord for a
product, ensures that stock is available (unless the product class
indicates that we don't need to track stock) and charges zero tax.

src/d/j/django-oscar-datacash-HEAD/tests/the3rdman_tests.py   django-oscar-datacash(Download)
            pass
        else:
            basket.strategy = strategy.Default()
 
        basket.add_product(product)

src/d/j/django-oscar-HEAD/tests/unit/basket/model_tests.py   django-oscar(Download)
    def setUp(self):
        self.basket = Basket()
        self.basket.strategy = strategy.Default()
 
    def test_has_zero_lines(self):

src/d/j/django-oscar-HEAD/tests/integration/partner/strategy_tests.py   django-oscar(Download)
    def setUp(self):
        self.strategy = strategy.Default()
 
    def test_no_stockrecords(self):
        product = factories.create_product()
    def setUp(self):
        self.strategy = strategy.Default()
        parent = factories.create_product()
        for x in range(3):
            factories.create_product(parent=parent)
    def setUp(self):
        self.strategy = strategy.Default()
        parent = factories.create_product()
        factories.create_product(parent=parent, price=D('10.00'),
                                 num_in_stock=3)
    def setUp(self):
        self.strategy = strategy.Default()
        parent = factories.create_product()
        factories.create_product(parent=parent, price=D('10.00'),
                                 num_in_stock=0)

src/d/j/django-oscar-HEAD/tests/integration/basket/model_tests.py   django-oscar(Download)
    def setUp(self):
        self.basket = Basket()
        self.basket.strategy = strategy.Default()
        self.product = factories.create_product()
        self.record = factories.create_stockrecord(
    def setUp(self):
        self.basket = Basket()
        self.basket.strategy = strategy.Default()
        self.product = factories.create_product()
        self.record = factories.create_stockrecord(
 
        self.main_basket = Basket()
        self.main_basket.strategy = strategy.Default()
        self.main_basket.add(self.product, quantity=2)
 
        self.merge_basket = Basket()
        self.merge_basket.strategy = strategy.Default()
    def setUp(self):
        self.basket = Basket()
        self.basket.strategy = strategy.Default()
        self.basket.submit()
 

src/d/j/django-oscar-HEAD/tests/functional/customer/profile_tests.py   django-oscar(Download)
 
        basket = Basket.open.get(owner=self.user)
        basket.strategy = strategy.Default()
        self.assertEqual(1, basket.all_lines().count())
 
 
        basket = Basket.open.get(owner=self.user)
        basket.strategy = strategy.Default()
        self.assertEqual(1, basket.all_lines().count())
 
 
        basket = Basket.objects.all()[0]
        basket.strategy = strategy.Default()
        self.assertEqual(len(basket.all_lines()), 1)
 
 
        basket = Basket.objects.all()[0]
        basket.strategy = strategy.Default()
        self.assertEqual(len(basket.all_lines()), 1)
 

src/d/j/django-oscar-HEAD/tests/functional/basket_tests.py   django-oscar(Download)
    def setUp(self):
        self.product = create_product(num_in_stock=10)
        self.user_basket = Basket()
        self.user_basket.strategy = strategy.Default()
        add_product(self.user_basket, product=self.product)
        self.cookie_basket = Basket()
        self.cookie_basket.strategy = strategy.Default()

src/d/j/django-oscar-HEAD/oscar/test/factories.py   django-oscar(Download)
def create_basket(empty=False):
    basket = Basket.objects.create()
    basket.strategy = strategy.Default()
    if not empty:
        product = create_product()
    if not basket:
        basket = Basket.objects.create()
        basket.strategy = strategy.Default()
        product = create_product()
        create_stockrecord(

src/d/j/django-oscar-HEAD/oscar/test/basket.py   django-oscar(Download)
        pass
    if not has_strategy:
        basket.strategy = strategy.Default()
    if price is None:
        price = D('1')

src/d/j/django-oscar-0.7/oscar/test/factories.py   django-oscar(Download)
def create_basket(empty=False):
    basket = Basket.objects.create()
    basket.strategy = strategy.Default()
    if not empty:
        product = create_product()
    if not basket:
        basket = Basket.objects.create()
        basket.strategy = strategy.Default()
        product = create_product()
        create_stockrecord(

src/d/j/django-oscar-0.7/oscar/test/basket.py   django-oscar(Download)
        pass
    if not has_strategy:
        basket.strategy = strategy.Default()
    if price is None:
        price = D('1')