mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	add coverage to barcode api
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user