2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-11 07:24:15 +00:00

Add PEP8-naming extension for flake

- Enforcing python naming checks
This commit is contained in:
Oliver Walters
2020-11-12 21:53:04 +11:00
parent 47cbf3071d
commit ae7fbd6112
22 changed files with 84 additions and 78 deletions

View File

@ -267,17 +267,17 @@ class BuildTest(TestCase):
# New stock items should have been created!
self.assertEqual(StockItem.objects.count(), 4)
A = StockItem.objects.get(pk=self.stock_1_1.pk)
a = StockItem.objects.get(pk=self.stock_1_1.pk)
# This stock item has been depleted!
with self.assertRaises(StockItem.DoesNotExist):
StockItem.objects.get(pk=self.stock_1_2.pk)
C = StockItem.objects.get(pk=self.stock_2_1.pk)
c = StockItem.objects.get(pk=self.stock_2_1.pk)
# Stock should have been subtracted from the original items
self.assertEqual(A.quantity, 900)
self.assertEqual(C.quantity, 4500)
self.assertEqual(a.quantity, 900)
self.assertEqual(c.quantity, 4500)
# And 10 new stock items created for the build output
outputs = StockItem.objects.filter(build=self.build)