aboutsummaryrefslogtreecommitdiff
path: root/rhodecode/tests/__init__.py
diff options
context:
space:
mode:
authorMarcin Kuzminski <marcin@python-works.com>2012-12-03 02:55:08 +0100
committerMarcin Kuzminski <marcin@python-works.com>2012-12-03 02:55:08 +0100
commit9f1be6440f2bc3376c6f4081514ab175e91cceef (patch)
treeafd7f97b74cc7c16df2c4f9d0dc854ab7cc3940b /rhodecode/tests/__init__.py
parent0d445369fefc2650d2a0a1f60cb2ff247f3a150d (diff)
Implemented #379 defaults settings page for creation of repositories
- locking - statistics, downloads - repository type --HG-- branch : beta
Diffstat (limited to 'rhodecode/tests/__init__.py')
-rw-r--r--rhodecode/tests/__init__.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/rhodecode/tests/__init__.py b/rhodecode/tests/__init__.py
index 5f7d6b7c..effa1783 100644
--- 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
+
+