[test] fix some tests broken since localperms cube extraction
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 15 Sep 2011 17:03:37 +0200
changeset 7795 b8027b317d1c
parent 7794 aed065b97f12
child 7796 8d8bde949535
[test] fix some tests broken since localperms cube extraction
server/test/unittest_repository.py
test/unittest_rqlrewrite.py
test/unittest_schema.py
--- a/server/test/unittest_repository.py	Thu Sep 15 16:40:52 2011 +0200
+++ b/server/test/unittest_repository.py	Thu Sep 15 17:03:37 2011 +0200
@@ -639,7 +639,7 @@
                           [u'system.version.basket', u'system.version.card', u'system.version.comment',
                            u'system.version.cubicweb', u'system.version.email',
                            u'system.version.file', u'system.version.folder',
-                           u'system.version.tag'])
+                           u'system.version.localperms', u'system.version.tag'])
 
 CALLED = []
 
--- a/test/unittest_rqlrewrite.py	Thu Sep 15 16:40:52 2011 +0200
+++ b/test/unittest_rqlrewrite.py	Thu Sep 15 17:03:37 2011 +0200
@@ -210,8 +210,8 @@
                         }, {})
         # XXX suboptimal
         self.assertEqual(rqlst.as_string(),
-                             "Any C,A,R WITH A,C,R BEING "
-                             "(Any A,C,R WHERE A? inlined_card C, A ref R, "
+                             "Any C,A,R WITH A,R,C BEING "
+                             "(Any A,R,C WHERE A ref R, A? inlined_card C, "
                              "(A is NULL) OR (EXISTS(A inlined_card B, B require_permission D, "
                              "B is Card, D is CWPermission)), "
                              "A is Affaire, C is Card, EXISTS(C require_permission E, E is CWPermission))")
--- a/test/unittest_schema.py	Thu Sep 15 16:40:52 2011 +0200
+++ b/test/unittest_schema.py	Thu Sep 15 17:03:37 2011 +0200
@@ -193,7 +193,7 @@
                               'fabrique_par', 'final', 'firstname', 'for_user', 'fournit',
                               'from_entity', 'from_state', 'fulltext_container', 'fulltextindexed',
 
-                              'has_text',
+                              'has_group_permission', 'has_text',
                               'identity', 'in_group', 'in_state', 'indexed',
                               'initial_state', 'inlined', 'internationalizable', 'is', 'is_instance_of',
 
@@ -225,12 +225,13 @@
         rels = sorted(str(r) for r in eschema.subject_relations())
         self.assertListEqual(rels, ['created_by', 'creation_date', 'custom_workflow',
                                     'cw_source', 'cwuri', 'eid',
-                                     'evaluee', 'firstname', 'has_text', 'identity',
-                                     'in_group', 'in_state', 'is',
-                                     'is_instance_of', 'last_login_time',
-                                     'login', 'modification_date', 'owned_by',
-                                     'primary_email', 'surname', 'upassword',
-                                     'use_email'])
+                                    'evaluee', 'firstname', 'has_group_permission',
+                                    'has_text', 'identity',
+                                    'in_group', 'in_state', 'is',
+                                    'is_instance_of', 'last_login_time',
+                                    'login', 'modification_date', 'owned_by',
+                                    'primary_email', 'surname', 'upassword',
+                                    'use_email'])
         rels = sorted(r.type for r in eschema.object_relations())
         self.assertListEqual(rels, ['bookmarked_by', 'created_by', 'for_user',
                                      'identity', 'owned_by', 'wf_info_for'])