diff --git a/product/ERP5Type/tests/testERP5Type.py b/product/ERP5Type/tests/testERP5Type.py index 17143caf90262b6466535d763d3530eab57d3836..14b6f5aec6032c9ac2c6895478b45e16c6e1aee7 100644 --- a/product/ERP5Type/tests/testERP5Type.py +++ b/product/ERP5Type/tests/testERP5Type.py @@ -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