mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Update unit testing
This commit is contained in:
parent
3a702266e6
commit
95fadf1300
@ -12,11 +12,6 @@
|
|||||||
|
|
||||||
<h3>{% trans "Bill of Materials" %}</h3>
|
<h3>{% trans "Bill of Materials" %}</h3>
|
||||||
|
|
||||||
{% if part.has_complete_bom_pricing == False %}
|
|
||||||
<div class='alert alert-block alert-warning'>
|
|
||||||
The BOM for <i>{{ part.full_name }}</i> does not have complete pricing information
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% if part.bom_checked_date %}
|
{% if part.bom_checked_date %}
|
||||||
{% if part.is_bom_valid %}
|
{% if part.is_bom_valid %}
|
||||||
<div class='alert alert-block alert-info'>
|
<div class='alert alert-block alert-info'>
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
- model: stock.stockitem
|
- model: stock.stockitem
|
||||||
pk: 100
|
pk: 100
|
||||||
fields:
|
fields:
|
||||||
|
batch: "B1234"
|
||||||
part: 25
|
part: 25
|
||||||
location: 7
|
location: 7
|
||||||
quantity: 10
|
quantity: 10
|
||||||
@ -54,6 +55,7 @@
|
|||||||
pk: 101
|
pk: 101
|
||||||
fields:
|
fields:
|
||||||
part: 25
|
part: 25
|
||||||
|
batch: "B2345"
|
||||||
location: 7
|
location: 7
|
||||||
quantity: 5
|
quantity: 5
|
||||||
level: 0
|
level: 0
|
||||||
|
@ -197,6 +197,10 @@ class StockTest(TestCase):
|
|||||||
def test_partial_move(self):
|
def test_partial_move(self):
|
||||||
w1 = StockItem.objects.get(pk=100)
|
w1 = StockItem.objects.get(pk=100)
|
||||||
|
|
||||||
|
# A batch code is required to split partial stock!
|
||||||
|
w1.batch = 'BW1'
|
||||||
|
w1.save()
|
||||||
|
|
||||||
# Move 6 of the units
|
# Move 6 of the units
|
||||||
self.assertTrue(w1.move(self.diningroom, 'Moved', None, quantity=6))
|
self.assertTrue(w1.move(self.diningroom, 'Moved', None, quantity=6))
|
||||||
|
|
||||||
@ -339,6 +343,7 @@ class StockTest(TestCase):
|
|||||||
# Item will deplete when deleted
|
# Item will deplete when deleted
|
||||||
item = StockItem.objects.get(pk=100)
|
item = StockItem.objects.get(pk=100)
|
||||||
item.delete_on_deplete = True
|
item.delete_on_deplete = True
|
||||||
|
|
||||||
item.save()
|
item.save()
|
||||||
|
|
||||||
n = StockItem.objects.filter(part=25).count()
|
n = StockItem.objects.filter(part=25).count()
|
||||||
|
Loading…
Reference in New Issue
Block a user