mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP and unit testing fixes
This commit is contained in:
parent
77361bd0a2
commit
4f0efec39f
@ -10,6 +10,10 @@
|
|||||||
status: 10 # PENDING
|
status: 10 # PENDING
|
||||||
creation_date: '2019-03-16'
|
creation_date: '2019-03-16'
|
||||||
link: http://www.google.com
|
link: http://www.google.com
|
||||||
|
level: 0
|
||||||
|
lft: 0
|
||||||
|
rght: 0
|
||||||
|
tree_id: 0
|
||||||
|
|
||||||
- model: build.build
|
- model: build.build
|
||||||
fields:
|
fields:
|
||||||
@ -19,4 +23,8 @@
|
|||||||
status: 40 # COMPLETE
|
status: 40 # COMPLETE
|
||||||
quantity: 21
|
quantity: 21
|
||||||
notes: 'Some more simple notes'
|
notes: 'Some more simple notes'
|
||||||
creation_date: '2019-03-16'
|
creation_date: '2019-03-16'
|
||||||
|
level: 0
|
||||||
|
lft: 0
|
||||||
|
rght: 0
|
||||||
|
tree_id: 1
|
@ -39,7 +39,7 @@ class BuildTestSimple(TestCase):
|
|||||||
self.assertEqual(b.batch, 'B2')
|
self.assertEqual(b.batch, 'B2')
|
||||||
self.assertEqual(b.quantity, 21)
|
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):
|
def test_url(self):
|
||||||
b1 = Build.objects.get(pk=1)
|
b1 = Build.objects.get(pk=1)
|
||||||
|
@ -433,7 +433,6 @@ class StockItem(MPTTModel):
|
|||||||
|
|
||||||
return max(self.quantity - self.allocation_count(), 0)
|
return max(self.quantity - self.allocation_count(), 0)
|
||||||
|
|
||||||
|
|
||||||
def can_delete(self):
|
def can_delete(self):
|
||||||
""" Can this stock item be deleted? It can NOT be deleted under the following circumstances:
|
""" Can this stock item be deleted? It can NOT be deleted under the following circumstances:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user