core: removed pyro4 from Enterprise code. Fixes #5198

This commit is contained in:
Marcin Kuzminski 2017-02-07 15:58:49 +01:00
parent 18f667c234
commit 3d3f2db34a
38 changed files with 47 additions and 854 deletions

View file

@ -321,27 +321,6 @@ def tests_tmp_path(request):
return TESTS_TMP_PATH
@pytest.fixture(scope='session', autouse=True)
def patch_pyro_request_scope_proxy_factory(request):
"""
Patch the pyro proxy factory to always use the same dummy request object
when under test. This will return the same pyro proxy on every call.
"""
dummy_request = pyramid.testing.DummyRequest()
def mocked_call(self, request=None):
return self.getProxy(request=dummy_request)
patcher = mock.patch(
'rhodecode.lib.vcs.client.RequestScopeProxyFactory.__call__',
new=mocked_call)
patcher.start()
@request.addfinalizer
def undo_patching():
patcher.stop()
@pytest.fixture
def test_repo_group(request):
"""
@ -1350,7 +1329,7 @@ def pytest_runtest_makereport(item, call):
"""
Adding the remote traceback if the exception has this information.
Pyro4 attaches this information as the attribute `_vcs_server_traceback`
VCSServer attaches this information as the attribute `_vcs_server_traceback`
to the exception instance.
"""
outcome = yield
@ -1411,7 +1390,8 @@ def collect_appenlight_stats(request, testrun):
})
server_and_port = pylonsapp.config['vcs.server']
server = create_vcsserver_proxy(server_and_port)
protocol = pylonsapp.config['vcs.server.protocol']
server = create_vcsserver_proxy(server_and_port, protocol)
with server:
vcs_pid = server.get_pid()
server.run_gc()