Files
@ e13a747e9c6a
Branch filter:
Location: kallithea/rhodecode/tests/models/test_repos.py - annotation
e13a747e9c6a
2.5 KiB
text/x-python
Migrate to jQuery 1.10.2 from 1.10.1.
Include the minified version of jQuery 1.10.2 instead of 1.10.1. The 1.10.2
files were download via these commands:
$ wget -N http://code.jquery.com/jquery-1.10.2.min.js
$ wget -N http://code.jquery.com/jquery-1.10.2.min.map
Meanwhile, since the Javascript code is covered by GPLv3, we should always
provide an up-to-date version of the source code. I have included it
here by creating the directory jquery-src. I extracted the correct version
of the source with the following commands:
$ git clone git://github.com/jquery/jquery.git
$ git checkout 1.10.2
which is what the jQuery website instructs to do: http://jquery.com/download/
This repository is mirrorred at https://kallithea-scm.org/repos/mirror/jquery/ .
Include the minified version of jQuery 1.10.2 instead of 1.10.1. The 1.10.2
files were download via these commands:
$ wget -N http://code.jquery.com/jquery-1.10.2.min.js
$ wget -N http://code.jquery.com/jquery-1.10.2.min.map
Meanwhile, since the Javascript code is covered by GPLv3, we should always
provide an up-to-date version of the source code. I have included it
here by creating the directory jquery-src. I extracted the correct version
of the source with the following commands:
$ git clone git://github.com/jquery/jquery.git
$ git checkout 1.10.2
which is what the jQuery website instructs to do: http://jquery.com/download/
This repository is mirrorred at https://kallithea-scm.org/repos/mirror/jquery/ .
749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 5067d6e826a5 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 | from rhodecode.tests import *
from rhodecode.model.meta import Session
from rhodecode.tests.fixture import Fixture
from rhodecode.model.repo import RepoModel
from rhodecode.model.db import Repository
from rhodecode.lib.exceptions import AttachedForksError
fixture = Fixture()
class TestRepos(BaseTestCase):
def setUp(self):
pass
def tearDown(self):
Session.remove()
def test_remove_repo(self):
repo = fixture.create_repo(name='test-repo-1')
Session().commit()
RepoModel().delete(repo=repo)
Session().commit()
self.assertEqual(None, Repository.get_by_repo_name(repo_name='test-repo-1'))
def test_remove_repo_repo_raises_exc_when_attached_forks(self):
repo = fixture.create_repo(name='test-repo-1')
Session().commit()
fixture.create_fork(repo.repo_name, 'test-repo-fork-1')
Session().commit()
self.assertRaises(AttachedForksError, lambda: RepoModel().delete(repo=repo))
def test_remove_repo_delete_forks(self):
repo = fixture.create_repo(name='test-repo-1')
Session().commit()
fork = fixture.create_fork(repo.repo_name, 'test-repo-fork-1')
Session().commit()
#fork of fork
fixture.create_fork(fork.repo_name, 'test-repo-fork-fork-1')
Session().commit()
RepoModel().delete(repo=repo, forks='delete')
Session().commit()
self.assertEqual(None, Repository.get_by_repo_name(repo_name='test-repo-1'))
self.assertEqual(None, Repository.get_by_repo_name(repo_name='test-repo-fork-1'))
self.assertEqual(None, Repository.get_by_repo_name(repo_name='test-repo-fork-fork-1'))
def test_remove_repo_detach_forks(self):
repo = fixture.create_repo(name='test-repo-1')
Session().commit()
fork = fixture.create_fork(repo.repo_name, 'test-repo-fork-1')
Session().commit()
#fork of fork
fixture.create_fork(fork.repo_name, 'test-repo-fork-fork-1')
Session().commit()
RepoModel().delete(repo=repo, forks='detach')
Session().commit()
try:
self.assertEqual(None, Repository.get_by_repo_name(repo_name='test-repo-1'))
self.assertNotEqual(None, Repository.get_by_repo_name(repo_name='test-repo-fork-1'))
self.assertNotEqual(None, Repository.get_by_repo_name(repo_name='test-repo-fork-fork-1'))
finally:
RepoModel().delete(repo='test-repo-fork-fork-1')
RepoModel().delete(repo='test-repo-fork-1')
Session().commit()
|