equal
deleted
inserted
replaced
|
1 import webtest |
|
2 |
|
3 from cubicweb.devtools.webtest import CubicWebTestTC |
|
4 |
|
5 from cubicweb.pyramid import make_cubicweb_application |
|
6 |
|
7 |
|
8 class PyramidCWTest(CubicWebTestTC): |
|
9 settings = {} |
|
10 |
|
11 @classmethod |
|
12 def init_config(cls, config): |
|
13 super(PyramidCWTest, cls).init_config(config) |
|
14 config.global_set_option('https-url', 'https://localhost.local/') |
|
15 config.global_set_option('anonymous-user', 'anon') |
|
16 config.https_uiprops = None |
|
17 config.https_datadir_url = None |
|
18 |
|
19 def setUp(self): |
|
20 # Skip CubicWebTestTC setUp |
|
21 super(CubicWebTestTC, self).setUp() |
|
22 config = make_cubicweb_application(self.config, self.settings) |
|
23 self.includeme(config) |
|
24 self.pyr_registry = config.registry |
|
25 self.webapp = webtest.TestApp( |
|
26 config.make_wsgi_app(), |
|
27 extra_environ={'wsgi.url_scheme': 'https'}) |
|
28 |
|
29 def includeme(self, config): |
|
30 pass |