Show More
@@ -19,6 +19,8 b'' | |||
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | import json |
|
22 | import os | |
|
23 | ||
|
22 | 24 | import mock |
|
23 | 25 | import pytest |
|
24 | 26 | |
@@ -107,6 +109,8 b' class TestGitServer(object):' | |||
|
107 | 109 | def test_run_returns_executes_command(self, git_server): |
|
108 | 110 | server = git_server.create() |
|
109 | 111 | from rhodecode.apps.ssh_support.lib.backends.git import GitTunnelWrapper |
|
112 | ||
|
113 | os.environ['SSH_CLIENT'] = '127.0.0.1' | |
|
110 | 114 | with mock.patch.object(GitTunnelWrapper, 'create_hooks_env') as _patch: |
|
111 | 115 | _patch.return_value = 0 |
|
112 | 116 | with mock.patch.object(GitTunnelWrapper, 'command', return_value='date'): |
@@ -108,6 +108,7 b' class TestMercurialServer(object):' | |||
|
108 | 108 | def test_run_returns_executes_command(self, hg_server): |
|
109 | 109 | server = hg_server.create() |
|
110 | 110 | from rhodecode.apps.ssh_support.lib.backends.hg import MercurialTunnelWrapper |
|
111 | os.environ['SSH_CLIENT'] = '127.0.0.1' | |
|
111 | 112 | with mock.patch.object(MercurialTunnelWrapper, 'create_hooks_env') as _patch: |
|
112 | 113 | _patch.return_value = 0 |
|
113 | 114 | with mock.patch.object(MercurialTunnelWrapper, 'command', return_value='date'): |
@@ -17,7 +17,7 b'' | |||
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | ||
|
20 | import os | |
|
21 | 21 | import mock |
|
22 | 22 | import pytest |
|
23 | 23 | |
@@ -174,6 +174,7 b' class TestSubversionServer(object):' | |||
|
174 | 174 | def test_run_returns_executes_command(self, svn_server): |
|
175 | 175 | server = svn_server.create() |
|
176 | 176 | from rhodecode.apps.ssh_support.lib.backends.svn import SubversionTunnelWrapper |
|
177 | os.environ['SSH_CLIENT'] = '127.0.0.1' | |
|
177 | 178 | with mock.patch.object( |
|
178 | 179 | SubversionTunnelWrapper, 'get_first_client_response', |
|
179 | 180 | return_value={'url': 'http://server/test-svn'}): |
General Comments 0
You need to be logged in to leave comments.
Login now