equal
deleted
inserted
replaced
1 import webtest |
1 import webtest |
2 |
2 |
3 from cubicweb.devtools.webtest import CubicWebTestTC |
3 from cubicweb.devtools.webtest import CubicWebTestTC |
4 |
4 |
5 from cubicweb.pyramid import make_cubicweb_application |
5 from cubicweb.pyramid import config_from_cwconfig |
6 |
6 |
7 |
7 |
8 class PyramidCWTest(CubicWebTestTC): |
8 class PyramidCWTest(CubicWebTestTC): |
9 settings = {} |
9 settings = {} |
10 |
10 |
14 config.global_set_option('anonymous-user', 'anon') |
14 config.global_set_option('anonymous-user', 'anon') |
15 |
15 |
16 def setUp(self): |
16 def setUp(self): |
17 # Skip CubicWebTestTC setUp |
17 # Skip CubicWebTestTC setUp |
18 super(CubicWebTestTC, self).setUp() |
18 super(CubicWebTestTC, self).setUp() |
19 config = make_cubicweb_application(self.config, self.settings) |
19 config = config_from_cwconfig(self.config, self.settings) |
20 self.includeme(config) |
20 self.includeme(config) |
21 self.pyr_registry = config.registry |
21 self.pyr_registry = config.registry |
22 self.webapp = webtest.TestApp( |
22 self.webapp = webtest.TestApp( |
23 config.make_wsgi_app(), |
23 config.make_wsgi_app(), |
24 extra_environ={'wsgi.url_scheme': 'https'}) |
24 extra_environ={'wsgi.url_scheme': 'https'}) |