[Erp5-report] r41693 nicolas.dumazet - /erp5/trunk/products/ERP5Type/tests/
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Dec 23 06:26:14 CET 2010
Author: nicolas.dumazet
Date: Thu Dec 23 06:26:13 2010
New Revision: 41693
URL: http://svn.erp5.org?rev=41693&view=rev
Log:
load ERP5Type.PropertySheet later, when products are initialized
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=41693&r1=41692&r2=41693&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/testDynamicClassGeneration.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/testDynamicClassGeneration.py [utf8] Thu Dec 23 06:26:13 2010
@@ -1030,12 +1030,6 @@ class TestZodbImportFilesystemPropertySh
'acquisition_sync_value')
def afterSetUp(self):
- # Get all the property sheets defined on the filesystem
- self.filesystem_property_sheet_list = []
- for name, klass in PropertySheet.__dict__.iteritems():
- if name[0] != '_':
- self.filesystem_property_sheet_list.append(klass)
-
# Mapping between the field name of a property and the default
# value as defined in StandardProperty and AcquiredProperty,
# meaningful because exporting a property relies on accessor which
@@ -1189,8 +1183,13 @@ class TestZodbImportFilesystemPropertySh
"""
portal = self.getPortalObject().portal_property_sheets
- for filesystem_property_sheet in self.filesystem_property_sheet_list:
- property_sheet_name = filesystem_property_sheet.__name__
+ from Products.ERP5Type import PropertySheet
+ # Get all the property sheets defined on the filesystem
+ for name, klass in PropertySheet.__dict__.iteritems():
+ if name[0] == '_':
+ continue
+ filesystem_property_sheet = klass
+ property_sheet_name = name
# Rename the filesystem Property Sheet class to avoid clashing
# with existing Property Sheets in portal_property_sheets
More information about the Erp5-report
mailing list