PEP and unit testing fixes

This commit is contained in:
Oliver Walters 2020-04-25 23:24:00 +10:00
parent 77361bd0a2
commit 4f0efec39f
3 changed files with 10 additions and 3 deletions

View File

@ -10,6 +10,10 @@
status: 10 # PENDING
creation_date: '2019-03-16'
link: http://www.google.com
level: 0
lft: 0
rght: 0
tree_id: 0
- model: build.build
fields:
@ -19,4 +23,8 @@
status: 40 # COMPLETE
quantity: 21
notes: 'Some more simple notes'
creation_date: '2019-03-16'
creation_date: '2019-03-16'
level: 0
lft: 0
rght: 0
tree_id: 1

View File

@ -39,7 +39,7 @@ class BuildTestSimple(TestCase):
self.assertEqual(b.batch, 'B2')
self.assertEqual(b.quantity, 21)
self.assertEqual(str(b), 'Build 21 x Orphan - A part without a category')
self.assertEqual(str(b), '21 x Orphan')
def test_url(self):
b1 = Build.objects.get(pk=1)

View File

@ -433,7 +433,6 @@ class StockItem(MPTTModel):
return max(self.quantity - self.allocation_count(), 0)
def can_delete(self):
""" Can this stock item be deleted? It can NOT be deleted under the following circumstances: