equal
deleted
inserted
replaced
21 from cubicweb.devtools import init_test_database |
21 from cubicweb.devtools import init_test_database |
22 from cubicweb.devtools.repotest import BasePlannerTC, test_plan |
22 from cubicweb.devtools.repotest import BasePlannerTC, test_plan |
23 from cubicweb.server.ssplanner import SSPlanner |
23 from cubicweb.server.ssplanner import SSPlanner |
24 |
24 |
25 # keep cnx so it's not garbage collected and the associated session closed |
25 # keep cnx so it's not garbage collected and the associated session closed |
26 repo, cnx = init_test_database() |
26 def setup_module(*args): |
|
27 global repo, cnx |
|
28 repo, cnx = init_test_database(apphome=SSPlannerTC.datadir) |
27 |
29 |
28 def teardown_module(*args): |
30 def teardown_module(*args): |
29 global repo, cnx |
31 global repo, cnx |
30 del repo, cnx |
32 del repo, cnx |
31 |
33 |
32 class SSPlannerTC(BasePlannerTC): |
34 class SSPlannerTC(BasePlannerTC): |
33 repo = repo |
|
34 _test = test_plan |
35 _test = test_plan |
35 |
36 |
36 def setUp(self): |
37 def setUp(self): |
|
38 self.__class__.repo = repo |
37 BasePlannerTC.setUp(self) |
39 BasePlannerTC.setUp(self) |
38 self.planner = SSPlanner(self.o.schema, self.repo.vreg.rqlhelper) |
40 self.planner = SSPlanner(self.o.schema, self.repo.vreg.rqlhelper) |
39 self.system = self.o._repo.system_source |
41 self.system = self.o._repo.system_source |
40 |
42 |
41 def tearDown(self): |
43 def tearDown(self): |