Commit b501c31e authored by Łukasz Nowak's avatar Łukasz Nowak

- test getInstanceBaseCategoryList in normal condition and after

   calling resetDynamicDocumentsOnceAtTransactionBoundary


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43889 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2b88b208
......@@ -3075,6 +3075,21 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
property_id_dict[property_id] = 1
self.assertEqual([], non_unique_property_id_list)
class TestInstanceBaseCategoryList(ERP5TypeTestCase):
def test_getInstanceBaseCategoryList(self):
portal = self.getPortalObject()
person_portal_type = self.portal.portal_types['Person']
person_category_list = person_portal_type.getInstanceBaseCategoryList()
self.assertNotEqual([], list(person_category_list))
def test_getInstanceBaseCategoryList_afterReset(self):
self.getTypesTool().resetDynamicDocumentsOnceAtTransactionBoundary()
transaction.commit()
portal = self.getPortalObject()
person_portal_type = self.portal.portal_types['Person']
person_category_list = person_portal_type.getInstanceBaseCategoryList()
self.assertNotEqual([], list(person_category_list))
class TestAccessControl(ERP5TypeTestCase):
# Isolate test in a dedicaced class in order not to break other tests
# when this one fails.
......@@ -3107,4 +3122,5 @@ def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestERP5Type))
suite.addTest(unittest.makeSuite(TestAccessControl))
suite.addTest(unittest.makeSuite(TestInstanceBaseCategoryList))
return suite
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