server/test/unittest_schemaserial.py
changeset 9796 2d1e488f6f71
parent 9795 e8039b12d52e
child 9956 19a683a0047c
child 9984 793377697c81
equal deleted inserted replaced
9795:e8039b12d52e 9796:2d1e488f6f71
    24 
    24 
    25 from cubicweb import Binary
    25 from cubicweb import Binary
    26 from cubicweb.schema import CubicWebSchemaLoader
    26 from cubicweb.schema import CubicWebSchemaLoader
    27 from cubicweb.devtools import TestServerConfiguration
    27 from cubicweb.devtools import TestServerConfiguration
    28 
    28 
       
    29 from cubicweb.server.schemaserial import (updateeschema2rql, updaterschema2rql, rschema2rql,
       
    30                                           eschema2rql, rdef2rql, specialize2rql,
       
    31                                           _erperms2rql as erperms2rql)
       
    32 
    29 from logilab.database import get_db_helper
    33 from logilab.database import get_db_helper
    30 from yams import register_base_type, unregister_base_type
    34 from yams import register_base_type, unregister_base_type
    31 
    35 
    32 schema = config = None
    36 schema = config = None
    33 def setUpModule(*args):
    37 def setUpModule(*args):
    50 
    54 
    51     unregister_base_type('BabarTestType')
    55     unregister_base_type('BabarTestType')
    52     helper = get_db_helper('sqlite')
    56     helper = get_db_helper('sqlite')
    53     helper.TYPE_MAPPING.pop('BabarTestType', None)
    57     helper.TYPE_MAPPING.pop('BabarTestType', None)
    54     helper.TYPE_CONVERTERS.pop('BabarTestType', None)
    58     helper.TYPE_CONVERTERS.pop('BabarTestType', None)
    55 
       
    56 from cubicweb.server.schemaserial import *
       
    57 from cubicweb.server.schemaserial import _erperms2rql as erperms2rql
       
    58 
    59 
    59 cstrtypemap = {'RQLConstraint': 'RQLConstraint_eid',
    60 cstrtypemap = {'RQLConstraint': 'RQLConstraint_eid',
    60                'SizeConstraint': 'SizeConstraint_eid',
    61                'SizeConstraint': 'SizeConstraint_eid',
    61                'StaticVocabularyConstraint': 'StaticVocabularyConstraint_eid',
    62                'StaticVocabularyConstraint': 'StaticVocabularyConstraint_eid',
    62                'FormatConstraint': 'FormatConstraint_eid',
    63                'FormatConstraint': 'FormatConstraint_eid',