diff --git a/rhodecode/tests/__init__.py b/rhodecode/tests/__init__.py --- a/rhodecode/tests/__init__.py +++ b/rhodecode/tests/__init__.py @@ -47,7 +47,7 @@ __all__ = [ 'TEST_USER_REGULAR2_PASS', 'TEST_USER_REGULAR2_EMAIL', 'TEST_HG_REPO', 'TEST_HG_REPO_CLONE', 'TEST_HG_REPO_PULL', 'TEST_GIT_REPO', 'TEST_GIT_REPO_CLONE', 'TEST_GIT_REPO_PULL', 'HG_REMOTE_REPO', - 'GIT_REMOTE_REPO', 'SCM_TESTS', + 'GIT_REMOTE_REPO', 'SCM_TESTS', '_get_repo_create_params' ] # Invoke websetup with the current config file @@ -163,3 +163,24 @@ class TestController(TestCase): 'msg `%s` not found in session flash: got `%s` instead' % ( msg, response.session['flash']) ) + + +## HELPERS ## + +def _get_repo_create_params(**custom): + defs = { + 'repo_name': None, + 'repo_type': 'hg', + 'clone_uri': '', + 'repo_group': '', + 'repo_description': 'DESC', + 'repo_private': False, + 'repo_landing_rev': 'tip' + } + defs.update(custom) + if 'repo_name_full' not in custom: + defs.update({'repo_name_full': defs['repo_name']}) + + return defs + +