mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 19:50:59 +00:00
Add some unit testing for the new model
This commit is contained in:
@ -70,6 +70,18 @@
|
||||
lft: 0
|
||||
rght: 0
|
||||
|
||||
- model: stock.stockitem
|
||||
pk: 105
|
||||
fields:
|
||||
part: 25
|
||||
location: 7
|
||||
quantity: 1
|
||||
serial: 1000
|
||||
level: 0
|
||||
tree_id: 0
|
||||
lft: 0
|
||||
rght: 0
|
||||
|
||||
# Stock items for template / variant parts
|
||||
- model: stock.stockitem
|
||||
pk: 500
|
||||
|
31
InvenTree/stock/fixtures/stock_tests.yaml
Normal file
31
InvenTree/stock/fixtures/stock_tests.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
- model: stock.stockitemtestresult
|
||||
fields:
|
||||
stock_item: 105
|
||||
test: "Firmware Version"
|
||||
value: "0xA1B2C3D4"
|
||||
result: True
|
||||
date: 2020-02-02
|
||||
|
||||
- model: stock.stockitemtestresult
|
||||
fields:
|
||||
stock_item: 105
|
||||
test: "Settings Checksum"
|
||||
value: "0xAABBCCDD"
|
||||
result: True
|
||||
date: 2020-02-02
|
||||
|
||||
- model: stock.stockitemtestresult
|
||||
fields:
|
||||
stock_item: 105
|
||||
test: "Temperature Test"
|
||||
result: False
|
||||
date: 2020-05-16
|
||||
notes: 'Got too hot or something'
|
||||
|
||||
- model: stock.stockitemtestresult
|
||||
fields:
|
||||
stock_item: 105
|
||||
test: "Temperature Test"
|
||||
result: True
|
||||
date: 2020-05-17
|
||||
notes: 'Passed temperature test by making it cooler'
|
Reference in New Issue
Block a user