mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Quick fix for unit test
- Sometimes the items are returned in a different order, maybe?
This commit is contained in:
		| @@ -649,8 +649,11 @@ class StockItemListTest(StockAPITestCase): | |||||||
|         ) |         ) | ||||||
|  |  | ||||||
|         self.assertEqual(len(response.data), 2) |         self.assertEqual(len(response.data), 2) | ||||||
|         self.assertEqual(response.data[0]["pk"], stock_1.pk) |  | ||||||
|         self.assertEqual(response.data[1]["pk"], stock_2.pk) |         ids = [item["pk"] for item in response.data] | ||||||
|  |  | ||||||
|  |         self.assertIn(stock_1.pk, ids) | ||||||
|  |         self.assertIn(stock_2.pk, ids) | ||||||
|  |  | ||||||
|     def test_query_count(self): |     def test_query_count(self): | ||||||
|         """Test that the number of queries required to fetch stock items is reasonable.""" |         """Test that the number of queries required to fetch stock items is reasonable.""" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user