[Erp5-report] r31728 leonardo - /erp5/trunk/products/ERP5/tests/testBase.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jan 13 15:53:41 CET 2010
Author: leonardo
Date: Wed Jan 13 15:53:39 2010
New Revision: 31728
URL: http://svn.erp5.org?rev=31728&view=rev
Log:
Check public methods of TempBase are truly public
Modified:
erp5/trunk/products/ERP5/tests/testBase.py
Modified: erp5/trunk/products/ERP5/tests/testBase.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testBase.py?rev=31728&r1=31727&r2=31728&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBase.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testBase.py [utf8] Wed Jan 13 15:53:39 2010
@@ -1136,6 +1136,16 @@
self.assertEquals(1, len(self.getPortal().portal_catalog(
translated_portal_type='Person', title='translate_table_test')))
+ def test_TempBasePublicMethods(self):
+ # make sure TempBase methods 'edit' and 'setProperty' are actually public
+ self.logout()
+ from Products.ERP5Type.Document import newTempBase
+ from OFS.Traversable import guarded_getattr
+ tb = newTempBase(self.portal, '_temp_base')
+ for name in ('edit', 'setProperty'):
+ # should not raise Unauthorized
+ edit = guarded_getattr(tb, 'edit')
+
@skip("isIndexable is not designed to work like tested here, this test \
must be rewritten once we know how to handle correctly templates")
def test_NonIndexable(self):
More information about the Erp5-report
mailing list