Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions test/test_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down