Show More
@@ -2,7 +2,7 b'' | |||
|
2 | 2 | testpaths = rhodecode |
|
3 | 3 | norecursedirs = rhodecode/public rhodecode/templates tests/scripts |
|
4 | 4 | |
|
5 |
py |
|
|
5 | pyramid_config = rhodecode/tests/rhodecode.ini | |
|
6 | 6 | vcsserver_protocol = http |
|
7 | 7 | vcsserver_config_http = rhodecode/tests/vcsserver_http.ini |
|
8 | 8 |
@@ -57,10 +57,10 b' def assert_no_running_instance(url):' | |||
|
57 | 57 | "Port is not free at %s, cannot start web interface" % url) |
|
58 | 58 | |
|
59 | 59 | |
|
60 |
def get_host_url(py |
|
|
60 | def get_host_url(pyramid_config): | |
|
61 | 61 | """Construct the host url using the port in the test configuration.""" |
|
62 | 62 | config = ConfigParser.ConfigParser() |
|
63 |
config.read(py |
|
|
63 | config.read(pyramid_config) | |
|
64 | 64 | |
|
65 | 65 | return '127.0.0.1:%s' % config.get('server:main', 'port') |
|
66 | 66 | |
@@ -69,14 +69,14 b' class RcWebServer(object):' | |||
|
69 | 69 | """ |
|
70 | 70 | Represents a running RCE web server used as a test fixture. |
|
71 | 71 | """ |
|
72 |
def __init__(self, py |
|
|
73 |
self.py |
|
|
72 | def __init__(self, pyramid_config): | |
|
73 | self.pyramid_config = pyramid_config | |
|
74 | 74 | |
|
75 | 75 | def repo_clone_url(self, repo_name, **kwargs): |
|
76 | 76 | params = { |
|
77 | 77 | 'user': TEST_USER_ADMIN_LOGIN, |
|
78 | 78 | 'passwd': TEST_USER_ADMIN_PASS, |
|
79 |
'host': get_host_url(self.py |
|
|
79 | 'host': get_host_url(self.pyramid_config), | |
|
80 | 80 | 'cloned_repo': repo_name, |
|
81 | 81 | } |
|
82 | 82 | params.update(**kwargs) |
@@ -84,7 +84,7 b' class RcWebServer(object):' | |||
|
84 | 84 | return _url |
|
85 | 85 | |
|
86 | 86 | def host_url(self): |
|
87 |
return 'http://' + get_host_url(self.py |
|
|
87 | return 'http://' + get_host_url(self.pyramid_config) | |
|
88 | 88 | |
|
89 | 89 | |
|
90 | 90 | @pytest.fixture(scope="module") |
@@ -44,18 +44,18 b' def pytest_addoption(parser):' | |||
|
44 | 44 | help="Set default Logging level for tests, warn (default), info, debug") |
|
45 | 45 | group = parser.getgroup('pylons') |
|
46 | 46 | group.addoption( |
|
47 |
'--with-pylons', dest='py |
|
|
47 | '--with-pylons', dest='pyramid_config', | |
|
48 | 48 | help="Set up a Pylons environment with the specified config file.") |
|
49 | 49 | group.addoption( |
|
50 | 50 | '--ini-config-override', action='store', type=_parse_json, |
|
51 |
default=None, dest='py |
|
|
51 | default=None, dest='pyramid_config_override', help=( | |
|
52 | 52 | "Overrides the .ini file settings. Should be specified in JSON" |
|
53 | 53 | " format, e.g. '{\"section\": {\"parameter\": \"value\", ...}}'" |
|
54 | 54 | ) |
|
55 | 55 | ) |
|
56 | 56 | parser.addini( |
|
57 |
'py |
|
|
58 |
"Set up a Py |
|
|
57 | 'pyramid_config', | |
|
58 | "Set up a Pyramid environment with the specified config file.") | |
|
59 | 59 | |
|
60 | 60 | vcsgroup = parser.getgroup('vcs') |
|
61 | 61 | vcsgroup.addoption( |
@@ -239,7 +239,7 b' class HttpVCSServer(VCSServer):' | |||
|
239 | 239 | |
|
240 | 240 | @pytest.fixture(scope='session') |
|
241 | 241 | def ini_config(request, tmpdir_factory, rcserver_port, vcsserver_port): |
|
242 |
option_name = 'py |
|
|
242 | option_name = 'pyramid_config' | |
|
243 | 243 | log_level = _use_log_level(request.config) |
|
244 | 244 | |
|
245 | 245 | overrides = [ |
General Comments 0
You need to be logged in to leave comments.
Login now