test/unittest_schema.py
changeset 7795 b8027b317d1c
parent 7791 31bb51ea5485
child 7962 38ce8b8a980f
equal deleted inserted replaced
7794:aed065b97f12 7795:b8027b317d1c
   191                               'ecrit_par', 'eid', 'evaluee', 'expression', 'exprtype',
   191                               'ecrit_par', 'eid', 'evaluee', 'expression', 'exprtype',
   192 
   192 
   193                               'fabrique_par', 'final', 'firstname', 'for_user', 'fournit',
   193                               'fabrique_par', 'final', 'firstname', 'for_user', 'fournit',
   194                               'from_entity', 'from_state', 'fulltext_container', 'fulltextindexed',
   194                               'from_entity', 'from_state', 'fulltext_container', 'fulltextindexed',
   195 
   195 
   196                               'has_text',
   196                               'has_group_permission', 'has_text',
   197                               'identity', 'in_group', 'in_state', 'indexed',
   197                               'identity', 'in_group', 'in_state', 'indexed',
   198                               'initial_state', 'inlined', 'internationalizable', 'is', 'is_instance_of',
   198                               'initial_state', 'inlined', 'internationalizable', 'is', 'is_instance_of',
   199 
   199 
   200                               'label', 'last_login_time', 'latest_retrieval', 'lieu', 'login',
   200                               'label', 'last_login_time', 'latest_retrieval', 'lieu', 'login',
   201 
   201 
   223 
   223 
   224         eschema = schema.eschema('CWUser')
   224         eschema = schema.eschema('CWUser')
   225         rels = sorted(str(r) for r in eschema.subject_relations())
   225         rels = sorted(str(r) for r in eschema.subject_relations())
   226         self.assertListEqual(rels, ['created_by', 'creation_date', 'custom_workflow',
   226         self.assertListEqual(rels, ['created_by', 'creation_date', 'custom_workflow',
   227                                     'cw_source', 'cwuri', 'eid',
   227                                     'cw_source', 'cwuri', 'eid',
   228                                      'evaluee', 'firstname', 'has_text', 'identity',
   228                                     'evaluee', 'firstname', 'has_group_permission',
   229                                      'in_group', 'in_state', 'is',
   229                                     'has_text', 'identity',
   230                                      'is_instance_of', 'last_login_time',
   230                                     'in_group', 'in_state', 'is',
   231                                      'login', 'modification_date', 'owned_by',
   231                                     'is_instance_of', 'last_login_time',
   232                                      'primary_email', 'surname', 'upassword',
   232                                     'login', 'modification_date', 'owned_by',
   233                                      'use_email'])
   233                                     'primary_email', 'surname', 'upassword',
       
   234                                     'use_email'])
   234         rels = sorted(r.type for r in eschema.object_relations())
   235         rels = sorted(r.type for r in eschema.object_relations())
   235         self.assertListEqual(rels, ['bookmarked_by', 'created_by', 'for_user',
   236         self.assertListEqual(rels, ['bookmarked_by', 'created_by', 'for_user',
   236                                      'identity', 'owned_by', 'wf_info_for'])
   237                                      'identity', 'owned_by', 'wf_info_for'])
   237         rschema = schema.rschema('relation_type')
   238         rschema = schema.rschema('relation_type')
   238         properties = rschema.rdef('CWAttribute', 'CWRType')
   239         properties = rschema.rdef('CWAttribute', 'CWRType')