mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fix API assertations
This commit is contained in:
parent
4eaa655a7c
commit
a68ee5ce0b
@ -242,14 +242,14 @@ class TestInvenTreeBarcode(APITestCase):
|
|||||||
reverse('api-barcode-link'), format='json',
|
reverse('api-barcode-link'), format='json',
|
||||||
data={
|
data={
|
||||||
'barcode': barcode_data,
|
'barcode': barcode_data,
|
||||||
'stockitem': 522
|
'stockitem': 521
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
self.assertIn('error', response.data)
|
self.assertIn('error', response.data)
|
||||||
|
|
||||||
# test with already existing stock
|
# test with already existing stock
|
||||||
test_assert_error('{"stockitem": 522}')
|
test_assert_error('{"stockitem": 521}')
|
||||||
|
|
||||||
# test with already existing stock location
|
# test with already existing stock location
|
||||||
test_assert_error('{"stocklocation": 7}')
|
test_assert_error('{"stocklocation": 7}')
|
||||||
|
@ -235,6 +235,7 @@
|
|||||||
lft: 0
|
lft: 0
|
||||||
rght: 0
|
rght: 0
|
||||||
status: 60
|
status: 60
|
||||||
|
uid: 1be0dfa925825c5c6c79301449e50c2d
|
||||||
|
|
||||||
- model: stock.stockitem
|
- model: stock.stockitem
|
||||||
pk: 522
|
pk: 522
|
||||||
@ -249,4 +250,3 @@
|
|||||||
rght: 0
|
rght: 0
|
||||||
expiry_date: "1990-10-10"
|
expiry_date: "1990-10-10"
|
||||||
status: 70
|
status: 70
|
||||||
uid: 1be0dfa925825c5c6c79301449e50c2d
|
|
||||||
|
Loading…
Reference in New Issue
Block a user