equal
deleted
inserted
replaced
1 from logilab.common.testlib import TestCase, unittest_main |
1 from logilab.common.testlib import TestCase, unittest_main |
|
2 |
|
3 from cubicweb import ValidationError |
2 from cubicweb.devtools.testlib import CubicWebTC |
4 from cubicweb.devtools.testlib import CubicWebTC |
3 |
|
4 ################# |
|
5 # <required ?> # |
|
6 ################# |
|
7 |
|
8 |
|
9 from datetime import datetime |
|
10 |
|
11 from cubicweb import (ConnectionError, ValidationError, AuthenticationError, |
|
12 BadConnectionId) |
|
13 from cubicweb.devtools.testlib import get_versions |
|
14 |
|
15 from cubicweb.server.sqlutils import SQL_PREFIX |
5 from cubicweb.server.sqlutils import SQL_PREFIX |
16 from cubicweb.server.repository import Repository |
6 |
17 |
7 |
18 orig_get_versions = Repository.get_versions |
8 SCHEMA_EIDS = {} |
19 ################# |
|
20 # </required ?> # |
|
21 ################# |
|
22 |
|
23 def setup_module(*args): |
|
24 Repository.get_versions = get_versions |
|
25 |
|
26 def teardown_module(*args): |
|
27 Repository.get_versions = orig_get_versions |
|
28 |
|
29 class SchemaModificationHooksTC(CubicWebTC): |
9 class SchemaModificationHooksTC(CubicWebTC): |
30 |
10 |
31 @classmethod |
11 @classmethod |
32 def init_config(cls, config): |
12 def init_config(cls, config): |
33 super(SchemaModificationHooksTC, cls).init_config(config) |
13 super(SchemaModificationHooksTC, cls).init_config(config) |