server/test/unittest_schemaserial.py
changeset 6631 26c303c3f1aa
parent 6340 470d8e828fda
child 6632 78878f5a8166
equal deleted inserted replaced
6630:f516ee1ef36c 6631:26c303c3f1aa
    24 from logilab.common.testlib import TestCase, unittest_main
    24 from logilab.common.testlib import TestCase, unittest_main
    25 
    25 
    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 loader = CubicWebSchemaLoader()
    29 def setup_module(*args):
    30 config = TestServerConfiguration('data')
    30     global schema, config
    31 config.bootstrap_cubes()
    31     loader = CubicWebSchemaLoader()
    32 schema = loader.load(config)
    32     config = TestServerConfiguration('data', apphome=Schema2RQLTC.datadir)
       
    33     config.bootstrap_cubes()
       
    34     schema = loader.load(config)
    33 
    35 
    34 def teardown_module(*args):
    36 def teardown_module(*args):
    35     global schema, config, loader
    37     global schema, config
    36     del schema, config, loader
    38     del schema, config
    37 
    39 
    38 from cubicweb.server.schemaserial import *
    40 from cubicweb.server.schemaserial import *
    39 from cubicweb.server.schemaserial import _erperms2rql as erperms2rql
    41 from cubicweb.server.schemaserial import _erperms2rql as erperms2rql
    40 
    42 
    41 cstrtypemap = {'RQLConstraint': 'RQLConstraint_eid',
    43 cstrtypemap = {'RQLConstraint': 'RQLConstraint_eid',