Style fixes

This commit is contained in:
Oliver Walters 2022-04-19 20:41:08 +10:00
parent 1fb94bf04b
commit 5fe2fb615b

View File

@ -219,13 +219,13 @@ class StockItemListTest(StockAPITestCase):
without_batch = self.get_stock(has_batch=0)
n_stock_items = StockItem.objects.all().count()
# Total sum should equal the total count of stock items
self.assertEqual(n_stock_items, len(with_batch) + len(without_batch))
for item in with_batch:
self.assertFalse(item['batch'] in [None, ''])
for item in without_batch:
self.assertTrue(item['batch'] in [None, ''])
@ -234,7 +234,7 @@ class StockItemListTest(StockAPITestCase):
Test the 'tracked' filter.
This checks if the stock item has either a batch code *or* a serial number
"""
tracked = self.get_stock(tracked=True)
untracked = self.get_stock(tracked=False)
@ -246,7 +246,7 @@ class StockItemListTest(StockAPITestCase):
for item in tracked:
self.assertTrue(item['batch'] not in blank or item['serial'] not in blank)
for item in untracked:
self.assertTrue(item['batch'] in blank and item['serial'] in blank)