Commit f393da5f authored by Yusei Tahara's avatar Yusei Tahara

Check portal_type argument in getMovementList method works.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26309 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 05d39a61
...@@ -2003,6 +2003,16 @@ class TestOrder(TestOrderMixin, ERP5TypeTestCase): ...@@ -2003,6 +2003,16 @@ class TestOrder(TestOrderMixin, ERP5TypeTestCase):
*cell_key) *cell_key)
self.assertEquals(2-1+len(cell_key_list), len(order.getMovementList())) self.assertEquals(2-1+len(cell_key_list), len(order.getMovementList()))
# Make sure that portal_type argument works correctly.
self.assertEqual(len(order.getMovementList(portal_type='Sale Order Line')),
len([movement
for movement in order.getMovementList()
if movement.portal_type=='Sale Order Line']))
self.assertEqual(len(order.getMovementList(portal_type='Sale Order Cell')),
len([movement
for movement in order.getMovementList()
if movement.portal_type=='Sale Order Cell']))
def test_19b_getTotalQuantityAndPrice(self, quiet=0, run=run_all_test): def test_19b_getTotalQuantityAndPrice(self, quiet=0, run=run_all_test):
""" """
Check getTotalQuantity and getTotalPrice. Check getTotalQuantity and getTotalPrice.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment