##// END OF EJS Templates
tests: Adapt tests to recent changes in vcs lib.
Martin Bornhold -
r849:87280852 default
parent child Browse files
Show More
@@ -24,6 +24,7 b' import pytest'
24 24 import webtest
25 25
26 26 from rhodecode.lib.middleware.utils import scm_app_http, scm_app
27 from rhodecode.lib.middleware.simplegit import SimpleGit
27 28 from rhodecode.lib.vcs.conf import settings
28 29
29 30
@@ -111,7 +112,7 b' def vcs_pyro4_app(vcsserver_pyro_echo_ap'
111 112 with mock.patch('rhodecode.lib.middleware.utils.scm_app.GIT_REMOTE_WSGI',
112 113 GIT_REMOTE_WSGI):
113 114 pyro4_app = scm_app.create_git_wsgi_app(
114 'stub_path', 'stub_name', stub_config)
115 'stub_path', 'stub_name', stub_config, SimpleGit.SCM)
115 116 app = webtest.TestApp(pyro4_app)
116 117 return app
117 118
@@ -86,13 +86,17 b' def test_remote_app_caller():'
86 86 return (['content'], '200 OK', [('Content-Type', 'text/plain')])
87 87
88 88 wrapper_app = wsgi_app_caller_client.RemoteAppCaller(
89 RemoteAppCallerMock(), 'a1', 'a2', arg3='a3', arg4='a4')
89 RemoteAppCallerMock(), 'dummy-backend',
90 'a1', 'a2', arg3='a3', arg4='a4')
90 91
91 92 test_app = webtest.TestApp(wrapper_app)
92 93
93 94 response = test_app.get('/path')
94 95
95 96 assert response.status == '200 OK'
96 assert response.headers.items() == [
97 ('Content-Type', 'text/plain'), ('Content-Length', '7')]
97 assert sorted(response.headers.items()) == sorted([
98 ('X-RhodeCode-Backend', 'dummy-backend'),
99 ('Content-Type', 'text/plain'),
100 ('Content-Length', '7'),
101 ])
98 102 assert response.body == 'content'
General Comments 0
You need to be logged in to leave comments. Login now