backport oldstable stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 27 Jul 2011 16:44:02 +0200
branchstable
changeset 7712 82c84ca05d6e
parent 7710 33636bd69faa (current diff)
parent 7711 458cb2edf63a (diff)
child 7713 467c52ff9557
backport oldstable
--- a/server/test/data/migratedapp/schema.py	Wed Jul 27 15:42:02 2011 +0200
+++ b/server/test/data/migratedapp/schema.py	Wed Jul 27 16:44:02 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 15:42:02 2011 +0200
+++ b/server/test/data/schema.py	Wed Jul 27 16:44:02 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 15:42:02 2011 +0200
+++ b/server/test/unittest_storage.py	Wed Jul 27 16:44:02 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)