mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add coverage to barcode api
This commit is contained in:
parent
925ae73eaa
commit
bd2b279390
@ -259,3 +259,12 @@ class TestInvenTreeBarcode(APITestCase):
|
||||
|
||||
# test with hash
|
||||
test_assert_error('{"blbla": 10004}')
|
||||
|
||||
def test_scan(self):
|
||||
"""
|
||||
Test that a barcode can be scanned
|
||||
"""
|
||||
|
||||
response = self.client.post(reverse('api-barcode-scan'), format='json', data={'barcode': 'blbla=10004',})
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
self.assertIn('success', response.data)
|
||||
|
@ -222,6 +222,7 @@
|
||||
lft: 0
|
||||
rght: 0
|
||||
expiry_date: "1990-10-10"
|
||||
uid: 9e5ae7fc20568ed4814c10967bba8b65
|
||||
|
||||
- model: stock.stockitem
|
||||
pk: 521
|
||||
|
Loading…
Reference in New Issue
Block a user