Show More
@@ -36,6 +36,7 b' import pyramid.testing' | |||
|
36 | 36 | import pytest |
|
37 | 37 | import colander |
|
38 | 38 | import requests |
|
39 | import pyramid.paster | |
|
39 | 40 | |
|
40 | 41 | import rhodecode |
|
41 | 42 | from rhodecode.lib.utils2 import AttributeDict |
@@ -218,6 +219,20 b' def http_environ(http_host_stub):' | |||
|
218 | 219 | } |
|
219 | 220 | |
|
220 | 221 | |
|
222 | @pytest.fixture(scope='session') | |
|
223 | def baseapp(ini_config, vcsserver, http_environ_session): | |
|
224 | from rhodecode.lib.pyramid_utils import get_app_config | |
|
225 | from rhodecode.config.middleware import make_pyramid_app | |
|
226 | ||
|
227 | print("Using the RhodeCode configuration:{}".format(ini_config)) | |
|
228 | pyramid.paster.setup_logging(ini_config) | |
|
229 | ||
|
230 | settings = get_app_config(ini_config) | |
|
231 | app = make_pyramid_app({'__file__': ini_config}, **settings) | |
|
232 | ||
|
233 | return app | |
|
234 | ||
|
235 | ||
|
221 | 236 | @pytest.fixture(scope='function') |
|
222 | 237 | def app(request, config_stub, baseapp, http_environ): |
|
223 | 238 | app = CustomTestApp( |
@@ -325,20 +325,6 b' def available_port(available_port_factor' | |||
|
325 | 325 | |
|
326 | 326 | |
|
327 | 327 | @pytest.fixture(scope='session') |
|
328 | def baseapp(ini_config, vcsserver, http_environ_session): | |
|
329 | from rhodecode.lib.pyramid_utils import get_app_config | |
|
330 | from rhodecode.config.middleware import make_pyramid_app | |
|
331 | ||
|
332 | print("Using the RhodeCode configuration:{}".format(ini_config)) | |
|
333 | pyramid.paster.setup_logging(ini_config) | |
|
334 | ||
|
335 | settings = get_app_config(ini_config) | |
|
336 | app = make_pyramid_app({'__file__': ini_config}, **settings) | |
|
337 | ||
|
338 | return app | |
|
339 | ||
|
340 | ||
|
341 | @pytest.fixture(scope='session') | |
|
342 | 328 | def testini_factory(tmpdir_factory, ini_config): |
|
343 | 329 | """ |
|
344 | 330 | Factory to create an INI file based on TestINI. |
General Comments 0
You need to be logged in to leave comments.
Login now