equal
deleted
inserted
replaced
12 from urllib import unquote |
12 from urllib import unquote |
13 |
13 |
14 from logilab.common.testlib import TestCase, unittest_main |
14 from logilab.common.testlib import TestCase, unittest_main |
15 from logilab.common.decorators import clear_cache |
15 from logilab.common.decorators import clear_cache |
16 |
16 |
17 from cubicweb.devtools.apptest import EnvBasedTC |
17 from cubicweb.devtools.testlib import CubicWebTC |
18 from cubicweb.devtools.fake import FakeRequest |
18 from cubicweb.devtools.fake import FakeRequest |
19 from cubicweb.web import Redirect, AuthenticationError, ExplicitLogin, INTERNAL_FIELD_VALUE |
19 from cubicweb.web import Redirect, AuthenticationError, ExplicitLogin, INTERNAL_FIELD_VALUE |
20 from cubicweb.web.views.basecontrollers import ViewController |
20 from cubicweb.web.views.basecontrollers import ViewController |
21 |
21 |
22 class FakeMapping: |
22 class FakeMapping: |
132 self.assertEquals(self.ctrl._cursor.executed, |
132 self.assertEquals(self.ctrl._cursor.executed, |
133 ['SET X works_for Y WHERE X eid 8, Y eid %s' % i |
133 ['SET X works_for Y WHERE X eid 8, Y eid %s' % i |
134 for i in (12, 13, 14)]) |
134 for i in (12, 13, 14)]) |
135 |
135 |
136 |
136 |
137 class ApplicationTC(EnvBasedTC): |
137 class ApplicationTC(CubicWebTC): |
138 |
138 |
139 def publish(self, req, path='view'): |
139 def publish(self, req, path='view'): |
140 return self.app.publish(path, req) |
140 return self.app.publish(path, req) |
141 |
141 |
142 def expect_redirect(self, callback, req): |
142 def expect_redirect(self, callback, req): |