fix(tests): fixed svn tests that now require request method

This commit is contained in:
RhodeCode Admin 2023-12-01 20:51:56 +01:00
parent 908be75d8a
commit 7f75e4e70e

View file

@ -84,6 +84,7 @@ def test_is_svn_returns_false_if_no_dav_header():
def test_is_svn_returns_true_if_magic_path_segment():
environ = {
'PATH_INFO': '/stub-repository/!svn/rev/4',
'REQUEST_METHOD': 'POST'
}
assert vcs.is_svn(environ)
@ -114,7 +115,8 @@ class TestVCSMiddleware(object):
def test_get_handler_app_retuns_svn_app_when_proxy_enabled(self, app):
environ = {
'PATH_INFO': SVN_REPO,
'HTTP_DAV': 'http://subversion.tigris.org/xmlns/dav/svn/log'
'HTTP_DAV': 'http://subversion.tigris.org/xmlns/dav/svn/log',
'REQUEST_METHOD': 'POST'
}
application = Mock()
config = {'appenlight': False, 'vcs.backends': ['svn']}
@ -133,7 +135,8 @@ class TestVCSMiddleware(object):
def test_get_handler_app_retuns_dummy_svn_app_when_proxy_disabled(self, app):
environ = {
'PATH_INFO': SVN_REPO,
'HTTP_DAV': 'http://subversion.tigris.org/xmlns/dav/svn/log'
'HTTP_DAV': 'http://subversion.tigris.org/xmlns/dav/svn/log',
'REQUEST_METHOD': 'POST'
}
application = Mock()
config = {'appenlight': False, 'vcs.backends': ['svn']}