fix API assertations

This commit is contained in:
Matthias 2022-03-12 03:52:50 +01:00
parent 4eaa655a7c
commit a68ee5ce0b
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
2 changed files with 3 additions and 3 deletions

View File

@ -242,14 +242,14 @@ class TestInvenTreeBarcode(APITestCase):
reverse('api-barcode-link'), format='json',
data={
'barcode': barcode_data,
'stockitem': 522
'stockitem': 521
}
)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertIn('error', response.data)
# test with already existing stock
test_assert_error('{"stockitem": 522}')
test_assert_error('{"stockitem": 521}')
# test with already existing stock location
test_assert_error('{"stocklocation": 7}')

View File

@ -235,6 +235,7 @@
lft: 0
rght: 0
status: 60
uid: 1be0dfa925825c5c6c79301449e50c2d
- model: stock.stockitem
pk: 522
@ -249,4 +250,3 @@
rght: 0
expiry_date: "1990-10-10"
status: 70
uid: 1be0dfa925825c5c6c79301449e50c2d