224 def test_initial_schema(self): |
224 def test_initial_schema(self): |
225 schema = self.repo.schema |
225 schema = self.repo.schema |
226 # check order of attributes is respected |
226 # check order of attributes is respected |
227 self.assertListEquals([r.type for r in schema.eschema('CWAttribute').ordered_relations() |
227 self.assertListEquals([r.type for r in schema.eschema('CWAttribute').ordered_relations() |
228 if not r.type in ('eid', 'is', 'is_instance_of', 'identity', |
228 if not r.type in ('eid', 'is', 'is_instance_of', 'identity', |
229 'creation_date', 'modification_date', |
229 'creation_date', 'modification_date', 'cwuri', |
230 'owned_by', 'created_by')], |
230 'owned_by', 'created_by')], |
231 ['relation_type', 'from_entity', 'to_entity', 'constrained_by', |
231 ['relation_type', 'from_entity', 'in_basket', 'to_entity', 'constrained_by', |
232 'cardinality', 'ordernum', |
232 'cardinality', 'ordernum', |
233 'indexed', 'fulltextindexed', 'internationalizable', |
233 'indexed', 'fulltextindexed', 'internationalizable', |
234 'defaultval', 'description_format', 'description']) |
234 'defaultval', 'description', 'description_format']) |
235 |
235 |
236 self.assertEquals(schema.eschema('CWEType').main_attribute(), 'name') |
236 self.assertEquals(schema.eschema('CWEType').main_attribute(), 'name') |
237 self.assertEquals(schema.eschema('State').main_attribute(), 'name') |
237 self.assertEquals(schema.eschema('State').main_attribute(), 'name') |
238 |
238 |
239 constraints = schema.rschema('name').rproperty('CWEType', 'String', 'constraints') |
239 constraints = schema.rschema('name').rproperty('CWEType', 'String', 'constraints') |