[repo test] Fix test broken by BFSSTestable oldstable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Wed, 27 Jul 2011 16:43:07 +0200
brancholdstable
changeset 7711 458cb2edf63a
parent 7703 2364087528e7
child 7712 82c84ca05d6e
child 7753 681ef2a664dd
[repo test] Fix test broken by BFSSTestable changeset bd56a29acaa8 broke several fragile test.
server/test/data/migratedapp/schema.py
server/test/data/schema.py
server/test/unittest_storage.py
--- a/server/test/data/migratedapp/schema.py	Wed Jul 27 12:25:48 2011 +0200
+++ b/server/test/data/migratedapp/schema.py	Wed Jul 27 16:43:07 2011 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -17,7 +17,7 @@
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """cw.server.migraction test"""
 from yams.buildobjs import (EntityType, RelationType, RelationDefinition,
-                            SubjectRelation,
+                            SubjectRelation, Bytes,
                             RichString, String, Int, Boolean, Datetime, Date)
 from yams.constraints import SizeConstraint, UniqueConstraint
 from cubicweb.schema import (WorkflowableEntityType, RQLConstraint,
@@ -36,6 +36,7 @@
     sujet = String(fulltextindexed=True,
                  constraints=[SizeConstraint(256)])
     concerne = SubjectRelation('Societe')
+    opt_attr = Bytes()
 
 class concerne(RelationType):
     __permissions__ = {
--- a/server/test/data/schema.py	Wed Jul 27 12:25:48 2011 +0200
+++ b/server/test/data/schema.py	Wed Jul 27 16:43:07 2011 +0200
@@ -24,9 +24,6 @@
                              RQLConstraint, RQLUniqueConstraint,
                              ERQLExpression, RRQLExpression)
 
-class BFSSTestable(EntityType):
-    opt_attr = Bytes()
-
 class Affaire(WorkflowableEntityType):
     __permissions__ = {
         'read':   ('managers',
@@ -45,6 +42,7 @@
 
     duration = Int()
     invoiced = Float()
+    opt_attr = Bytes()
 
     depends_on = SubjectRelation('Affaire')
     require_permission = SubjectRelation('CWPermission')
--- a/server/test/unittest_storage.py	Wed Jul 27 12:25:48 2011 +0200
+++ b/server/test/unittest_storage.py	Wed Jul 27 16:43:07 2011 +0200
@@ -259,7 +259,7 @@
 
     @tag('update', 'NULL')
     def test_bfss_update_to_None(self):
-        f = self.session.create_entity('BFSSTestable', opt_attr=Binary('toto'))
+        f = self.session.create_entity('Affaire', opt_attr=Binary('toto'))
         self.session.commit()
         self.session.set_pool()
         f.set_attributes(opt_attr=None)