Files
@ f4fed0b32103
Branch filter:
Location: kallithea/rhodecode/tests/functional/test_settings.py - annotation
f4fed0b32103
1.9 KiB
text/x-python
Rewrote git middleware with the same pattern as recent fix for #176
- additionally fixed dulwich server bug, that used old deprecated method. This fix caused huge improvement of speed for fetching git repos
- moved simplehg and simplegit middleware into begining of pylons callstack. This low level middleware
don't need to run any of the middlewares except each other.
- additionally fixed dulwich server bug, that used old deprecated method. This fix caused huge improvement of speed for fetching git repos
- moved simplehg and simplegit middleware into begining of pylons callstack. This low level middleware
don't need to run any of the middlewares except each other.
1e757ac98988 1e757ac98988 1e757ac98988 1e757ac98988 1e757ac98988 1e757ac98988 1e757ac98988 1e757ac98988 8acbfa837180 1e757ac98988 8acbfa837180 1e757ac98988 1e757ac98988 1e757ac98988 8acbfa837180 8acbfa837180 1e757ac98988 1e757ac98988 1e757ac98988 8acbfa837180 1e757ac98988 8acbfa837180 1e757ac98988 1e757ac98988 1e757ac98988 8acbfa837180 1e757ac98988 1e757ac98988 8acbfa837180 1e757ac98988 f1629c0c28cc 1e757ac98988 8acbfa837180 1e757ac98988 1e757ac98988 8acbfa837180 1e757ac98988 80dc0a23edf7 8acbfa837180 8acbfa837180 1e757ac98988 1e757ac98988 1e757ac98988 1e757ac98988 1e757ac98988 1e757ac98988 1e757ac98988 8acbfa837180 1e757ac98988 | from rhodecode.model.db import Repository
from rhodecode.tests import *
class TestSettingsController(TestController):
def test_index(self):
self.log_user()
response = self.app.get(url(controller='settings', action='index',
repo_name=HG_REPO))
# Test response...
def test_fork(self):
self.log_user()
response = self.app.get(url(controller='settings', action='fork',
repo_name=HG_REPO))
def test_fork_create(self):
self.log_user()
fork_name = HG_FORK
description = 'fork of vcs test'
repo_name = HG_REPO
response = self.app.post(url(controller='settings', action='fork_create',
repo_name=repo_name),
{'fork_name':fork_name,
'repo_type':'hg',
'description':description,
'private':'False'})
#test if we have a message that fork is ok
assert 'forked %s repository as %s' \
% (repo_name, fork_name) in response.session['flash'][0], 'No flash message about fork'
#test if the fork was created in the database
fork_repo = self.sa.query(Repository).filter(Repository.repo_name == fork_name).one()
assert fork_repo.repo_name == fork_name, 'wrong name of repo name in new db fork repo'
assert fork_repo.fork.repo_name == repo_name, 'wrong fork parrent'
#test if fork is visible in the list ?
response = response.follow()
#check if fork is marked as fork
response = self.app.get(url(controller='summary', action='index',
repo_name=fork_name))
assert 'Fork of %s' % repo_name in response.body, 'no message about that this repo is a fork'
|