# HG changeset patch # User Sylvain Thénault # Date 1311777842 -7200 # Node ID 82c84ca05d6e82249524e3ae7d7b86f1af5ebf9e # Parent 33636bd69faaa5aaeb6f8aa173d08ac382acfafe# Parent 458cb2edf63afba5acb78c0df40f4fa87afd5995 backport oldstable diff -r 33636bd69faa -r 82c84ca05d6e server/test/data/migratedapp/schema.py --- 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 . """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__ = { diff -r 33636bd69faa -r 82c84ca05d6e server/test/data/schema.py --- 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') diff -r 33636bd69faa -r 82c84ca05d6e server/test/unittest_storage.py --- 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)