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

- check that propertyMap for ERP5 type is returning unique list of

   property ids


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43407 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a6f79da1
......@@ -3050,6 +3050,17 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
if len(index_list):
portal_actions.deleteActions(selections=index_list)
def test_propertyMap_unique_properties(self):
portal = self.getPortalObject()
person = portal.person_module.newContent(portal_type='Person')
property_id_dict = dict()
non_unique_property_id_list = []
for property_id in [p['id'] for p in person.propertyMap()]:
if property_id in property_id_dict:
non_unique_property_id_list.append(property_id)
property_id_dict[property_id] = 1
self.assertEqual([], non_unique_property_id_list)
class TestAccessControl(ERP5TypeTestCase):
# Isolate test in a dedicaced class in order not to break other tests
# when this one fails.
......
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