Show More
@@ -30,6 +30,7 b' import subprocess32' | |||||
30 | import time |
|
30 | import time | |
31 | import uuid |
|
31 | import uuid | |
32 | import dateutil.tz |
|
32 | import dateutil.tz | |
|
33 | import functools | |||
33 |
|
34 | |||
34 | import mock |
|
35 | import mock | |
35 | import pyramid.testing |
|
36 | import pyramid.testing | |
@@ -65,7 +66,7 b' from rhodecode.tests import (' | |||||
65 | TEST_USER_REGULAR_PASS) |
|
66 | TEST_USER_REGULAR_PASS) | |
66 | from rhodecode.tests.utils import CustomTestApp, set_anonymous_access |
|
67 | from rhodecode.tests.utils import CustomTestApp, set_anonymous_access | |
67 | from rhodecode.tests.fixture import Fixture |
|
68 | from rhodecode.tests.fixture import Fixture | |
68 |
|
69 | from rhodecode.config import utils as config_utils | ||
69 |
|
70 | |||
70 | def _split_comma(value): |
|
71 | def _split_comma(value): | |
71 | return value.split(',') |
|
72 | return value.split(',') | |
@@ -254,6 +255,12 b' def app_settings(baseapp, ini_config):' | |||||
254 | return baseapp.config.get_settings() |
|
255 | return baseapp.config.get_settings() | |
255 |
|
256 | |||
256 |
|
257 | |||
|
258 | @pytest.fixture(scope='session') | |||
|
259 | def db_connection(ini_settings): | |||
|
260 | # Initialize the database connection. | |||
|
261 | config_utils.initialize_database(ini_settings) | |||
|
262 | ||||
|
263 | ||||
257 | LoginData = collections.namedtuple('LoginData', ('csrf_token', 'user')) |
|
264 | LoginData = collections.namedtuple('LoginData', ('csrf_token', 'user')) | |
258 |
|
265 | |||
259 |
|
266 |
@@ -30,6 +30,8 b' import configobj' | |||||
30 | import pytest |
|
30 | import pytest | |
31 |
|
31 | |||
32 | import pyramid.paster |
|
32 | import pyramid.paster | |
|
33 | ||||
|
34 | from rhodecode.lib.pyramid_utils import get_app_config | |||
33 | from rhodecode.tests.fixture import TestINI |
|
35 | from rhodecode.tests.fixture import TestINI | |
34 | import rhodecode |
|
36 | import rhodecode | |
35 |
|
37 | |||
@@ -278,6 +280,12 b' def ini_config(request, tmpdir_factory, ' | |||||
278 |
|
280 | |||
279 |
|
281 | |||
280 | @pytest.fixture(scope='session') |
|
282 | @pytest.fixture(scope='session') | |
|
283 | def ini_settings(ini_config): | |||
|
284 | ini_path = ini_config | |||
|
285 | return get_app_config(ini_path) | |||
|
286 | ||||
|
287 | ||||
|
288 | @pytest.fixture(scope='session') | |||
281 | def rcserver_port(request): |
|
289 | def rcserver_port(request): | |
282 | port = get_available_port() |
|
290 | port = get_available_port() | |
283 | print('Using rcserver port {}'.format(port)) |
|
291 | print('Using rcserver port {}'.format(port)) |
General Comments 0
You need to be logged in to leave comments.
Login now