1
0
forked from erp-dev/erp
This commit is contained in:
2026-02-02 16:25:14 +08:00
parent 59c78b7c64
commit 3c56b9ea8b
3 changed files with 44 additions and 1 deletions

View File

@@ -114,6 +114,10 @@ class PreSalesAllocationAPITestCase(TestCase):
self.assertEqual(resp.status_code, status.HTTP_201_CREATED)
self.assertEqual(resp.data['stock_ids'], [self.stock_detail.id])
self.assertEqual(str(resp.data['quantity']), '5.50')
self.assertIn('stock_details', resp.data)
self.assertEqual(resp.data['stock_details'][0]['product_id'], self.product.id)
self.assertEqual(resp.data['stock_details'][0]['product_name'], self.product.name)
self.assertEqual(str(resp.data['stock_details'][0]['quantity']), '12.50')
def test_cancel_allocation_record(self):
order = self._create_order()