##// END OF EJS Templates
Incorporate CSS from select2-bootstrap-css & its license information....
Incorporate CSS from select2-bootstrap-css & its license information. RhodeCode 2.2.5 included a modified version of this upstream work. We include herein the upstream version as downloaded and incorporated using the following commands: (cd /tmp; \ git clone https://github.com/t0m/select2-bootstrap-css ) cp /tmp/select2-bootstrap-css/select2-bootstrap.css rhodecode/public/js/select2/ The content used to be appended to select2.css but we now keep it in a separate file select2-bootstrap.css . This file could be included in root.html like select2.css but we do currently not want to use bootstrap. The license info was incorporated from /tmp/select2-bootstrap-css/LICENSE into our LICENSE.md file.

File last commit:

r3797:d7488551 beta
r4130:15e50704 rhodecode-2.2.5-gpl
Show More
test_vcs.py
86 lines | 2.6 KiB | text/x-python | PythonLexer
Added vcs testsuite for better integration tests + added fetching...
r2451 from __future__ import with_statement
synced vcs with upstream...
r3797 import os
import shutil
Added vcs testsuite for better integration tests + added fetching...
r2451 from rhodecode.lib.vcs import VCSError, get_repo, get_backend
from rhodecode.lib.vcs.backends.hg import MercurialRepository
from rhodecode.lib.vcs.utils.compat import unittest
synced vcs with upstream...
r3797 from rhodecode.tests.vcs.conf import TEST_HG_REPO, TEST_GIT_REPO, TEST_TMP_PATH
Added vcs testsuite for better integration tests + added fetching...
r2451
class VCSTest(unittest.TestCase):
"""
Tests for main module's methods.
"""
def test_get_backend(self):
hg = get_backend('hg')
self.assertEqual(hg, MercurialRepository)
def test_alias_detect_hg(self):
alias = 'hg'
path = TEST_HG_REPO
backend = get_backend(alias)
repo = backend(path)
self.assertEqual('hg',repo.alias)
def test_alias_detect_git(self):
alias = 'git'
path = TEST_GIT_REPO
backend = get_backend(alias)
repo = backend(path)
self.assertEqual('git',repo.alias)
def test_wrong_alias(self):
alias = 'wrong_alias'
self.assertRaises(VCSError, get_backend, alias)
def test_get_repo(self):
alias = 'hg'
path = TEST_HG_REPO
backend = get_backend(alias)
repo = backend(path)
self.assertEqual(repo.__class__, get_repo(path, alias).__class__)
self.assertEqual(repo.path, get_repo(path, alias).path)
def test_get_repo_autoalias_hg(self):
alias = 'hg'
path = TEST_HG_REPO
backend = get_backend(alias)
repo = backend(path)
self.assertEqual(repo.__class__, get_repo(path).__class__)
self.assertEqual(repo.path, get_repo(path).path)
def test_get_repo_autoalias_git(self):
alias = 'git'
path = TEST_GIT_REPO
backend = get_backend(alias)
repo = backend(path)
self.assertEqual(repo.__class__, get_repo(path).__class__)
self.assertEqual(repo.path, get_repo(path).path)
def test_get_repo_err(self):
blank_repo_path = os.path.join(TEST_TMP_PATH, 'blank-error-repo')
if os.path.isdir(blank_repo_path):
shutil.rmtree(blank_repo_path)
os.mkdir(blank_repo_path)
self.assertRaises(VCSError, get_repo, blank_repo_path)
self.assertRaises(VCSError, get_repo, blank_repo_path + 'non_existing')
def test_get_repo_multialias(self):
multialias_repo_path = os.path.join(TEST_TMP_PATH, 'hg-git-repo')
if os.path.isdir(multialias_repo_path):
shutil.rmtree(multialias_repo_path)
os.mkdir(multialias_repo_path)
os.mkdir(os.path.join(multialias_repo_path, '.git'))
os.mkdir(os.path.join(multialias_repo_path, '.hg'))
self.assertRaises(VCSError, get_repo, multialias_repo_path)