From a9b7deb1a37d255cfc6a139e9209f7d431be7c4b Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine <arnaud.fontaine@nexedi.com> Date: Tue, 26 Oct 2010 07:22:13 +0000 Subject: [PATCH] Fix generation of accessor holders for Document ZODB Property Sheets and typos in ZODB Property Sheets test git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39521 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/dynamic/portal_type_class.py | 3 ++- .../ERP5Type/tests/testDynamicClassGeneration.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/product/ERP5Type/dynamic/portal_type_class.py b/product/ERP5Type/dynamic/portal_type_class.py index 99fe17b606..cc031bafa5 100644 --- a/product/ERP5Type/dynamic/portal_type_class.py +++ b/product/ERP5Type/dynamic/portal_type_class.py @@ -163,7 +163,8 @@ def generatePortalTypeClass(portal_type_name): # _fillAccessorHolderList( # accessor_holder_list, # site.portal_property_sheets.createFilesystemPropertySheetAccessorHolder, - # [ klass.__name__ for klass in getClassPropertyList(type_class) ], + # [ property_sheet.__name__ for property_sheet in \ + # getClassPropertyList(klass) ], # erp5.filesystem_accessor_holder, # FilesystemPropertySheet) diff --git a/product/ERP5Type/tests/testDynamicClassGeneration.py b/product/ERP5Type/tests/testDynamicClassGeneration.py index 449c60b618..01060d4d5e 100644 --- a/product/ERP5Type/tests/testDynamicClassGeneration.py +++ b/product/ERP5Type/tests/testDynamicClassGeneration.py @@ -274,16 +274,16 @@ class TestZodbPropertySheet(ERP5TypeTestCase): self._newCategoryExistenceConstraint() # Create all the test Properties - for op in ('change', 'delete', 'assign'): - self._newStandardProperty(op) - self._newAcquiredProperty(op) - self._newCategoryProperty(op) - self._newDynamicCategoryProperty(op) + for operation_type in ('change', 'delete', 'assign'): + self._newStandardProperty(operation_type) + self._newAcquiredProperty(operation_type) + self._newCategoryProperty(operation_type) + self._newDynamicCategoryProperty(operation_type) # Bind all test properties to this instance, so they can be # accessed easily in further tests - for prop in self.test_property_sheet.contentValues(): - setattr(self, prop.getReference(), prop) + for property in self.test_property_sheet.contentValues(): + setattr(self, property.getReference(), property) # Create a Portal Type for the tests, this is necessary, otherwise # there will be no accessor holder generated @@ -313,7 +313,7 @@ class TestZodbPropertySheet(ERP5TypeTestCase): self.tic() # Ensure that erp5.acessor_holder is empty - from Products.ERP5Type.Dynamic.portaltypeclass import \ + from Products.ERP5Type.dynamic.portal_type_class import \ synchronizeDynamicModules synchronizeDynamicModules(portal, force=True) -- 2.30.9