Commit 7c7e3b19 authored by Julien Muchembled's avatar Julien Muchembled

Fix testApparelModel (MappedValue does not inherit Amount anymore)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41900 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4ab14221
......@@ -83,8 +83,8 @@ elif len(colour_range.contentValues(portal_type=\'Apparel Colour Range Variation
cell = fabric.getCell(cat, base_id=\'composition\')\n
if cell is not None:\n
new_cell = context.newCell(cat, base_id=\'composition\',\n
portal_type=\'Mapped Value\')\n
new_cell.setQuantity(cell.getQuantity())\n
portal_type=\'Mapped Value\', # XXX\n
quantity=cell.getProperty(\'quantity\'))\n
if len(poly_list):\n
msg = context.Base_translateString(\'${count} Compositions created.\',\n
mapping={\'count\': len(poly_list)})\n
......
272
\ No newline at end of file
273
\ No newline at end of file
......@@ -152,13 +152,13 @@ class TestApparelModel(ERP5TypeTestCase):
'composition/acrylique',
base_id = 'composition')
self.assertNotEquals(acrylique, None)
self.assertEqual(acrylique.getQuantity(), 0.88)
self.assertEqual(acrylique.getProperty('quantity'), 0.88)
elasthane = apparel_model.getCell(
'composition/elasthane',
base_id = 'composition')
self.assertNotEquals(elasthane, None)
self.assertEqual(elasthane.getQuantity(), 0.12)
self.assertEqual(elasthane.getProperty('quantity'), 0.12)
# check indexes are present
self.assertTrue(apparel_model.index.has_key('composition'))
......
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