[Erp5-report] r39872 nicolas.dumazet - /erp5/trunk/products/ERP5Type/tests/
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Nov 4 06:51:48 CET 2010
Author: nicolas.dumazet
Date: Thu Nov 4 06:51:46 2010
New Revision: 39872
URL: http://svn.erp5.org?rev=39872&view=rev
Log:
clear doubts on accessor generation if a temp portal type generates accessors first
Modified:
erp5/trunk/products/ERP5Type/tests/testDynamicClassGeneration.py
Modified: erp5/trunk/products/ERP5Type/tests/testDynamicClassGeneration.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/testDynamicClassGeneration.py?rev=39872&r1=39871&r2=39872&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/testDynamicClassGeneration.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/testDynamicClassGeneration.py [utf8] Thu Nov 4 06:51:46 2010
@@ -190,6 +190,20 @@ class TestPortalTypeClass(ERP5TypeTestCa
type_class='Folder')
newDocument(portal_type='Folder')
+ def testPropertyGenerationOnTempPortalType(self):
+ portal = self.portal
+ temp = portal.organisation_module.newContent('temp_portal_type',
+ 'Organisation',
+ temp_object=True)
+ temp.setCorporateName('foobar')
+ synchronizeDynamicModules(portal, force=True)
+
+ # check what is happening if aq_dynamic is called on the
+ # temp portal type first
+ accessor = temp._aq_dynamic('getCorporateName')
+ self.failIfEqual(accessor, None)
+ self.assertEquals(accessor(), 'foobar')
+ self.assertEquals(temp.__class__.__module__, 'erp5.temp_portal_type')
class TestZodbPropertySheet(ERP5TypeTestCase):
"""
More information about the Erp5-report
mailing list