diff --git a/test/test_order.py b/test/test_order.py index ef552d7..838fc72 100644 --- a/test/test_order.py +++ b/test/test_order.py @@ -269,11 +269,15 @@ def test_order_complete_with_receive(self): result = po.receiveAll(location=use_location.pk) # Check the result returned - self.assertIsInstance(result, dict) - self.assertIn('items', result) - self.assertIn('location', result) - # Check that all except one line were marked - self.assertEqual(len(result['items']), len(po.getLineItems()) - 1) + if self.api.api_version < 385: # Ref: https://github.com/inventree/InvenTree/pull/10174/ + self.assertIsInstance(result, dict) + self.assertIn('items', result) + self.assertIn('location', result) + # Check that all except one line were marked + self.assertEqual(len(result['items']), len(po.getLineItems()) - 1) + else: + self.assertIsInstance(result, list) + self.assertEqual(len(result), len(po.getLineItems()) - 1) # Receive all line items again - make sure answer is None # use the StockLocation item here