server/test/unittest_migractions.py
changeset 6595 00cd0b273cf5
parent 6427 c8a5ac2d1eaa
child 6632 78878f5a8166
equal deleted inserted replaced
6594:e10468a23291 6595:00cd0b273cf5
    13 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    13 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    14 # details.
    14 # details.
    15 #
    15 #
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 """unit tests for module cubicweb.server.migractions
    18 """unit tests for module cubicweb.server.migractions"""
    19 """
       
    20 
    19 
    21 from __future__ import with_statement
    20 from __future__ import with_statement
    22 
    21 
    23 from copy import deepcopy
    22 from copy import deepcopy
    24 from datetime import date
    23 from datetime import date
    49         config._cubes = None
    48         config._cubes = None
    50         cls.repo.fill_schema()
    49         cls.repo.fill_schema()
    51         cls.origschema = deepcopy(cls.repo.schema)
    50         cls.origschema = deepcopy(cls.repo.schema)
    52         # hack to read the schema from data/migrschema
    51         # hack to read the schema from data/migrschema
    53         config.appid = join('data', 'migratedapp')
    52         config.appid = join('data', 'migratedapp')
       
    53         config._apphome = cls.datapath('migratedapp')
    54         global migrschema
    54         global migrschema
    55         migrschema = config.load_schema()
    55         migrschema = config.load_schema()
    56         config.appid = 'data'
    56         config.appid = 'data'
       
    57         config._apphome = cls.datadir
    57         assert 'Folder' in migrschema
    58         assert 'Folder' in migrschema
    58 
    59 
    59     @classmethod
    60     @classmethod
    60     def _refresh_repo(cls):
    61     def _refresh_repo(cls):
    61         super(MigrationCommandsTC, cls)._refresh_repo()
    62         super(MigrationCommandsTC, cls)._refresh_repo()