Check public methods of TempBase are truly public

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31728 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9e89cb85
......@@ -1136,6 +1136,16 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
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):
......
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