# HG changeset patch # User Sylvain Thénault # Date 1246609623 -7200 # Node ID dd9758cb77e1bebc98587ef8e270c1fc3a4240ec # Parent 799ff50ddfe86e6d9b0c01c8a1a7fd9c0320bab0 cleanup diff -r 799ff50ddfe8 -r dd9758cb77e1 devtools/apptest.py --- a/devtools/apptest.py Fri Jul 03 10:26:19 2009 +0200 +++ b/devtools/apptest.py Fri Jul 03 10:27:03 2009 +0200 @@ -462,14 +462,13 @@ self.__close = repo.close self.cnxid = self.cnx.sessionid self.session = repo._sessions[self.cnxid] - # XXX copy schema since hooks may alter it and it may be not fully - # cleaned (missing some schema synchronization support) - try: - origschema = repo.__schema - except AttributeError: - origschema = repo.schema - repo.__schema = origschema if self.copy_schema: + # XXX copy schema since hooks may alter it and it may be not fully + # cleaned (missing some schema synchronization support) + try: + origschema = repo.__schema + except AttributeError: + repo.__schema = origschema = repo.schema repo.schema = deepcopy(origschema) repo.set_schema(repo.schema) # reset hooks repo.vreg.update_schema(repo.schema) diff -r 799ff50ddfe8 -r dd9758cb77e1 schema.py --- a/schema.py Fri Jul 03 10:26:19 2009 +0200 +++ b/schema.py Fri Jul 03 10:27:03 2009 +0200 @@ -356,6 +356,7 @@ """rql expression factory""" return ERQLExpression(expression, mainvars, eid) + class CubicWebRelationSchema(RelationSchema): RelationSchema._RPROPERTIES['eid'] = None _perms_checked = False