2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 19:50:59 +00:00

Refactored Stock test to use fixtures

This commit is contained in:
Oliver Walters
2019-05-12 21:46:38 +10:00
parent 25e41b3fa2
commit f410957d8d
5 changed files with 142 additions and 63 deletions

View File

@ -26,6 +26,18 @@
- model: stock.stocklocation
pk: 5
fields:
name: 'Drawer'
name: 'Drawer_1'
description: 'In my desk'
parent: 4
- model: stock.stocklocation
pk: 6
fields:
name: 'Drawer_2'
description: 'Also in my desk'
parent: 4
- model: stock.stocklocation
pk: 7
fields:
name: 'Drawer_3'
description: 'Again, in my desk'
parent: 4

View File

@ -0,0 +1,42 @@
# Create some sample stock items
# 4,000 screws in the dining room
- model: stock.stockitem
fields:
part: 1
location: 3
batch: 'B123'
quantity: 4000
# 5,000 screws in the bathroom
- model: stock.stockitem
fields:
part: 1
location: 2
quantity: 5000
# 1234 2K2 resistors in 'Drawer_1'
- model: stock.stockitem
fields:
part: 3
location: 5
quantity: 1234
# Some widgets in drawer 3
- model: stock.stockitem
fields:
part: 25
location: 7
quantity: 10
- model: stock.stockitem
fields:
part: 25
location: 7
quantity: 5
- model: stock.stockitem
fields:
part: 25
location: 7
quantity: 3