diff --git a/rhodecode/apps/ssh_support/tests/test_server_git.py b/rhodecode/apps/ssh_support/tests/test_server_git.py --- a/rhodecode/apps/ssh_support/tests/test_server_git.py +++ b/rhodecode/apps/ssh_support/tests/test_server_git.py @@ -112,6 +112,7 @@ class TestGitServer(object): with patch('os.environ', {'SSH_CLIENT': '10.10.10.10 b'}): with patch('os.putenv') as putenv_mock: server._update_environment() + expected_data = { "username": git_server.user, "scm": "git", @@ -122,8 +123,8 @@ class TestGitServer(object): "locked_by": [None, None], "config": "" } - putenv_mock.assert_called_once_with( - 'RC_SCM_DATA', json.dumps(expected_data)) + args, kwargs = putenv_mock.call_args + assert json.loads(args[1]) == expected_data class TestGitServerCheckPermissions(object): diff --git a/rhodecode/tests/lib/middleware/test_simplehg.py b/rhodecode/tests/lib/middleware/test_simplehg.py --- a/rhodecode/tests/lib/middleware/test_simplehg.py +++ b/rhodecode/tests/lib/middleware/test_simplehg.py @@ -83,7 +83,7 @@ def test_get_config(pylonsapp, user_util app = simplehg.SimpleHg(application=None, config={'auth_ret_code': '', 'base_path': ''}, registry=None) - extras = {'foo': 'FOO', 'bar': 'BAR'} + extras = [('foo', 'FOO', 'bar', 'BAR')] hg_config = app._create_config(extras, repo_name=repo.repo_name) @@ -110,7 +110,7 @@ def test_get_config(pylonsapp, user_util ('phases', 'publish', 'True'), ('extensions', 'largefiles', ''), ('paths', '/', hg_config_org.get('paths', '/')), - ('rhodecode', 'RC_SCM_DATA', '{"foo": "FOO", "bar": "BAR"}') + ('rhodecode', 'RC_SCM_DATA', '[["foo", "FOO", "bar", "BAR"]]') ] for entry in expected_config: assert entry in hg_config