mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-05 21:20:56 +00:00
Add some BomItem tests
- Add a bom fixture
This commit is contained in:
29
InvenTree/part/fixtures/bom.yaml
Normal file
29
InvenTree/part/fixtures/bom.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
# Construct a BOM for item 100 'Bob'
|
||||
|
||||
# 10 x M2x4 LPHS
|
||||
- model: part.bomitem
|
||||
fields:
|
||||
part: 100
|
||||
sub_part: 1
|
||||
quantity: 10
|
||||
|
||||
# 40 x R_2K2_0805
|
||||
- model: part.bomitem
|
||||
fields:
|
||||
part: 100
|
||||
sub_part: 3
|
||||
quantity: 40
|
||||
|
||||
# 25 x C_22N_0805
|
||||
- model: part.bomitem
|
||||
fields:
|
||||
part: 100
|
||||
sub_part: 5
|
||||
quantity: 25
|
||||
|
||||
# 3 x Orphan
|
||||
- model: part.bomitem
|
||||
fields:
|
||||
part: 100
|
||||
sub_part: 50
|
||||
quantity: 3
|
@ -5,6 +5,7 @@
|
||||
name: 'M2x4 LPHS'
|
||||
description: 'M2x4 low profile head screw'
|
||||
category: 8
|
||||
|
||||
- model: part.part
|
||||
fields:
|
||||
name: 'M3x12 SHCS'
|
||||
@ -18,6 +19,7 @@
|
||||
name: 'R_2K2_0805'
|
||||
description: '2.2kOhm resistor in 0805 package'
|
||||
category: 2
|
||||
|
||||
- model: part.part
|
||||
fields:
|
||||
name: 'R_4K7_0603'
|
||||
@ -39,7 +41,17 @@
|
||||
category: 7
|
||||
|
||||
- model: part.part
|
||||
pk: 50
|
||||
fields:
|
||||
name: 'Orphan'
|
||||
description: 'A part without a category'
|
||||
category: null
|
||||
category: null
|
||||
|
||||
# A part that can be made from other parts
|
||||
- model: part.part
|
||||
pk: 100
|
||||
fields:
|
||||
name: 'Bob'
|
||||
description: 'Can we build it?'
|
||||
buildable: true
|
||||
|
Reference in New Issue
Block a user