コード例 #1
0
ファイル: test_api.py プロジェクト: adamchainz/django-bazaar
 def test_get_stock_quantity_from_empty_stock(self):
     quantity = get_stock_quantity(ProductFactory(), Location.LOCATION_STORAGE)
     self.assertEqual(quantity, 0)
コード例 #2
0
ファイル: test_api.py プロジェクト: adamchainz/django-bazaar
 def test_get_stock_quantity_for_composite(self):
     quantity = get_stock_quantity(self.composite, Location.LOCATION_STORAGE)
     self.assertEqual(quantity, 10)
コード例 #3
0
ファイル: test_api.py プロジェクト: giok57/django-bazaar
 def test_get_stock_quantity_from_empty_stock(self):
     quantity = get_stock_quantity(ProductFactory(),
                                   Location.LOCATION_STORAGE)
     self.assertEqual(quantity, 0)
コード例 #4
0
ファイル: test_api.py プロジェクト: adamchainz/django-bazaar
 def test_get_stock_quantity_for_single_product(self):
     quantity = get_stock_quantity(self.product_a, Location.LOCATION_STORAGE)
     self.assertEqual(quantity, 50)
コード例 #5
0
ファイル: test_api.py プロジェクト: giok57/django-bazaar
 def test_get_stock_quantity(self):
     quantity = get_stock_quantity(self.product_a,
                                   Location.LOCATION_STORAGE)
     self.assertEqual(quantity, 50)