mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 03:56:43 +00:00
Style fixes
This commit is contained in:
parent
1fb94bf04b
commit
5fe2fb615b
@ -219,13 +219,13 @@ class StockItemListTest(StockAPITestCase):
|
|||||||
without_batch = self.get_stock(has_batch=0)
|
without_batch = self.get_stock(has_batch=0)
|
||||||
|
|
||||||
n_stock_items = StockItem.objects.all().count()
|
n_stock_items = StockItem.objects.all().count()
|
||||||
|
|
||||||
# Total sum should equal the total count of stock items
|
# Total sum should equal the total count of stock items
|
||||||
self.assertEqual(n_stock_items, len(with_batch) + len(without_batch))
|
self.assertEqual(n_stock_items, len(with_batch) + len(without_batch))
|
||||||
|
|
||||||
for item in with_batch:
|
for item in with_batch:
|
||||||
self.assertFalse(item['batch'] in [None, ''])
|
self.assertFalse(item['batch'] in [None, ''])
|
||||||
|
|
||||||
for item in without_batch:
|
for item in without_batch:
|
||||||
self.assertTrue(item['batch'] in [None, ''])
|
self.assertTrue(item['batch'] in [None, ''])
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ class StockItemListTest(StockAPITestCase):
|
|||||||
Test the 'tracked' filter.
|
Test the 'tracked' filter.
|
||||||
This checks if the stock item has either a batch code *or* a serial number
|
This checks if the stock item has either a batch code *or* a serial number
|
||||||
"""
|
"""
|
||||||
|
|
||||||
tracked = self.get_stock(tracked=True)
|
tracked = self.get_stock(tracked=True)
|
||||||
untracked = self.get_stock(tracked=False)
|
untracked = self.get_stock(tracked=False)
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ class StockItemListTest(StockAPITestCase):
|
|||||||
|
|
||||||
for item in tracked:
|
for item in tracked:
|
||||||
self.assertTrue(item['batch'] not in blank or item['serial'] not in blank)
|
self.assertTrue(item['batch'] not in blank or item['serial'] not in blank)
|
||||||
|
|
||||||
for item in untracked:
|
for item in untracked:
|
||||||
self.assertTrue(item['batch'] in blank and item['serial'] in blank)
|
self.assertTrue(item['batch'] in blank and item['serial'] in blank)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user