def setUp(self): self.product = factories.create_product() self.stockrecord = factories.create_stockrecord(self.product) self.assertTrue(self.product.get_product_class().track_stock) self.availability = availability.DelegateToStockRecord( self.product, self.stockrecord)
def create_purchase_info(record): return strategy.PurchaseInfo( price=prices.FixedPrice( record.price_currency, record.price_excl_tax, D('0.00') # Default to no tax ), availability=availability.DelegateToStockRecord(record), stockrecord=record)