update test for new test schema tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 18 Feb 2009 01:42:07 +0100
branchtls-sprint
changeset 750 89e997bc2bf1
parent 749 c23169f79a3b
child 751 ec16f43107d3
update test for new test schema
test/data/schema.py
test/unittest_cwconfig.py
test/unittest_schema.py
test/unittest_vregistry.py
--- a/test/data/schema.py	Wed Feb 18 01:33:53 2009 +0100
+++ b/test/data/schema.py	Wed Feb 18 01:42:07 2009 +0100
@@ -16,7 +16,7 @@
 
 class SubNote(Note):
     __specializes_schema__ = True
-    descr = String()
+    description = String()
 
 class tags(RelationDefinition):
     subject = 'Tag'
--- a/test/unittest_cwconfig.py	Wed Feb 18 01:33:53 2009 +0100
+++ b/test/unittest_cwconfig.py	Wed Feb 18 01:42:07 2009 +0100
@@ -68,7 +68,8 @@
         self.assertEquals([unabsolutize(p) for p in self.config.vregistry_path()],
                           ['entities', 'web/views', 'sobjects',
                            'file/entities.py', 'file/views', 'file/hooks.py',
-                           'email/entities.py', 'email/views', 'email/hooks.py'])
+                           'email/entities.py', 'email/views', 'email/hooks.py',
+                           'test/data/entities.py'])
             
 if __name__ == '__main__':
     unittest_main()
--- a/test/unittest_schema.py	Wed Feb 18 01:33:53 2009 +0100
+++ b/test/unittest_schema.py	Wed Feb 18 01:42:07 2009 +0100
@@ -144,10 +144,10 @@
                              'ECache', 'EConstraint', 'EConstraintType', 'EEType',
                              'EFRDef', 'EGroup', 'EmailAddress', 'ENFRDef',
                              'EPermission', 'EProperty', 'ERType', 'EUser',
-                             'Float', 'Int', 'Interval', 
-                             'Password', 
+                             'File', 'Float', 'Image', 'Int', 'Interval', 'Note',
+                             'Password', 'Personne',
                              'RQLExpression', 
-                             'State', 'String', 'Time', 
+                             'Societe', 'State', 'String', 'SubNote', 'Tag', 'Time', 
                              'Transition', 'TrInfo']
         self.assertListEquals(entities, sorted(expected_entities))
         relations = [str(r) for r in schema.relations()]
@@ -156,13 +156,13 @@
                               'allowed_transition', 'bookmarked_by', 'canonical',
 
                               'cardinality', 'comment', 'comment_format', 
-                              'composite', 'condition', 'constrained_by', 'content',
+                              'composite', 'condition', 'connait', 'constrained_by', 'content',
                               'content_format', 'created_by', 'creation_date', 'cstrtype',
 
-                              'defaultval', 'delete_permission', 'description',
-                              'description_format', 'destination_state',
+                              'data', 'data_encoding', 'data_format', 'defaultval', 'delete_permission',
+                              'description', 'description_format', 'destination_state',
 
-                              'eid', 'expression', 'exprtype',
+                              'ecrit_par', 'eid', 'evaluee', 'expression', 'exprtype',
 
                               'final', 'firstname', 'for_user',
                               'from_entity', 'from_state', 'fulltext_container', 'fulltextindexed',
@@ -175,17 +175,17 @@
 
                               'mainvars', 'meta', 'modification_date',
 
-                              'name', 
+                              'name', 'nom',
 
                               'ordernum', 'owned_by',
 
-                              'path', 'pkey', 'primary_email', 
+                              'path', 'pkey', 'prenom', 'primary_email', 
 
                               'read_permission', 'relation_type', 'require_group',
                               
                               'specializes', 'state_of', 'surname', 'symetric', 'synopsis',
 
-                              'timestamp', 'title', 'to_entity', 'to_state', 'transition_of',
+                              'tags', 'timestamp', 'title', 'to_entity', 'to_state', 'transition_of', 'travaille', 'type',
 
                               'upassword', 'update_permission', 'use_email',
 
@@ -198,7 +198,7 @@
         eschema = schema.eschema('EUser')
         rels = sorted(str(r) for r in eschema.subject_relations())
         self.assertListEquals(rels, ['created_by', 'creation_date', 'eid',
-                                     'firstname', 'has_text', 'identity',
+                                     'evaluee', 'firstname', 'has_text', 'identity',
                                      'in_group', 'in_state', 'is',
                                      'is_instance_of', 'last_login_time',
                                      'login', 'modification_date', 'owned_by',
--- a/test/unittest_vregistry.py	Wed Feb 18 01:33:53 2009 +0100
+++ b/test/unittest_vregistry.py	Wed Feb 18 01:42:07 2009 +0100
@@ -40,7 +40,6 @@
             __selectors__ = (myselector1, myselector2)
         AnAppObject.build___select__()
         self.assertEquals(AnAppObject.__select__(AnAppObject), 2)
-        self.assertEquals(AnAppObject.__select__(), 2)
 
     def test_properties(self):
         self.failIf('system.version.cubicweb' in self.vreg['propertydefs'])