equal
deleted
inserted
replaced
33 from twisted.internet import reactor |
33 from twisted.internet import reactor |
34 from twisted.internet.error import CannotListenError |
34 from twisted.internet.error import CannotListenError |
35 |
35 |
36 from logilab.common.testlib import TestCase |
36 from logilab.common.testlib import TestCase |
37 |
37 |
38 from cubicweb.dbapi import in_memory_cnx |
38 from cubicweb.dbapi import in_memory_repo_cnx |
39 from cubicweb.etwist.server import CubicWebRootResource |
39 from cubicweb.etwist.server import CubicWebRootResource |
40 from cubicweb.devtools import BaseApptestConfiguration, init_test_database |
40 from cubicweb.devtools import BaseApptestConfiguration, init_test_database |
41 |
41 |
42 |
42 |
43 |
43 |
162 self.twill_output = StringIO() |
162 self.twill_output = StringIO() |
163 hijack_twill_output(self.twill_output) |
163 hijack_twill_output(self.twill_output) |
164 # build a config, and get a connection |
164 # build a config, and get a connection |
165 self.config = LivetestConfiguration(self.cube, self.sourcefile) |
165 self.config = LivetestConfiguration(self.cube, self.sourcefile) |
166 _, user, passwd, _ = loadconf() |
166 _, user, passwd, _ = loadconf() |
167 self.repo, self.cnx = in_memory_cnx(self.config, user, password=passwd) |
167 self.repo, self.cnx = in_memory_repo_cnx(self.config, user, password=passwd) |
168 self.setup_db(self.cnx) |
168 self.setup_db(self.cnx) |
169 |
169 |
170 def tearDown(self): |
170 def tearDown(self): |
171 self.teardown_db(self.cnx) |
171 self.teardown_db(self.cnx) |
172 |
172 |