Commit 2de60fc5 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[test] Stop using lgc.testlib in unittest_migractions

parent 2dd0dcb2e5f9
...@@ -24,7 +24,6 @@ from datetime import date ...@@ -24,7 +24,6 @@ from datetime import date
from contextlib import contextmanager from contextlib import contextmanager
import tempfile import tempfile
from logilab.common.testlib import unittest_main, Tags, tag
from logilab.common import tempattr from logilab.common import tempattr
from yams.constraints import UniqueConstraint from yams.constraints import UniqueConstraint
...@@ -71,8 +70,6 @@ class MigrationTC(CubicWebTC): ...@@ -71,8 +70,6 @@ class MigrationTC(CubicWebTC):
configcls = MigrationConfig configcls = MigrationConfig
tags = CubicWebTC.tags | Tags(('server', 'migration', 'migractions'))
def _init_repo(self): def _init_repo(self):
super(MigrationTC, self)._init_repo() super(MigrationTC, self)._init_repo()
# we have to read schema from the database to get eid for schema entities # we have to read schema from the database to get eid for schema entities
...@@ -510,7 +507,6 @@ class MigrationCommandsTC(MigrationTC): ...@@ -510,7 +507,6 @@ class MigrationCommandsTC(MigrationTC):
newconstraints = rdef.constraints newconstraints = rdef.constraints
self.assertEqual(len(newconstraints), 0) self.assertEqual(len(newconstraints), 0)
@tag('longrun')
def test_sync_schema_props_perms(self): def test_sync_schema_props_perms(self):
with self.mh() as (cnx, mh): with self.mh() as (cnx, mh):
nbrqlexpr_start = cnx.execute('Any COUNT(X) WHERE X is RQLExpression')[0][0] nbrqlexpr_start = cnx.execute('Any COUNT(X) WHERE X is RQLExpression')[0][0]
...@@ -653,7 +649,6 @@ class MigrationCommandsTC(MigrationTC): ...@@ -653,7 +649,6 @@ class MigrationCommandsTC(MigrationTC):
finally: finally:
mh.cmd_set_size_constraint('CWEType', 'description', None) mh.cmd_set_size_constraint('CWEType', 'description', None)
@tag('longrun')
def test_add_drop_cube_and_deps(self): def test_add_drop_cube_and_deps(self):
with self.mh() as (cnx, mh): with self.mh() as (cnx, mh):
schema = self.repo.schema schema = self.repo.schema
...@@ -711,8 +706,6 @@ class MigrationCommandsTC(MigrationTC): ...@@ -711,8 +706,6 @@ class MigrationCommandsTC(MigrationTC):
# next test may fail complaining of missing tables # next test may fail complaining of missing tables
cnx.commit() cnx.commit()
@tag('longrun')
def test_add_drop_cube_no_deps(self): def test_add_drop_cube_no_deps(self):
with self.mh() as (cnx, mh): with self.mh() as (cnx, mh):
cubes = set(self.config.cubes()) cubes = set(self.config.cubes())
...@@ -738,7 +731,6 @@ class MigrationCommandsTC(MigrationTC): ...@@ -738,7 +731,6 @@ class MigrationCommandsTC(MigrationTC):
mh.cmd_drop_cube('file') mh.cmd_drop_cube('file')
self.assertEqual(str(cm.exception), "can't remove cube file, used as a dependency") self.assertEqual(str(cm.exception), "can't remove cube file, used as a dependency")
@tag('longrun')
def test_introduce_base_class(self): def test_introduce_base_class(self):
with self.mh() as (cnx, mh): with self.mh() as (cnx, mh):
mh.cmd_add_entity_type('Para') mh.cmd_add_entity_type('Para')
...@@ -1013,4 +1005,5 @@ class MigrationCommandsComputedTC(MigrationTC): ...@@ -1013,4 +1005,5 @@ class MigrationCommandsComputedTC(MigrationTC):
if __name__ == '__main__': if __name__ == '__main__':
unittest_main() import unittest
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment