Mercurial > kallithea
diff rhodecode/tests/functional/test_settings.py @ 688:8acbfa837180 beta
Tests rewrite for 1.2 added some globals configs to make tests easier.
Fixed search index_location to take from configuration files now
fixed git http_user_agent bug
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 14 Nov 2010 17:24:32 +0100 |
parents | 80dc0a23edf7 |
children | f1629c0c28cc |
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_settings.py Sun Nov 14 01:30:02 2010 +0100 +++ b/rhodecode/tests/functional/test_settings.py Sun Nov 14 17:24:32 2010 +0100 @@ -6,40 +6,38 @@ def test_index(self): self.log_user() response = self.app.get(url(controller='settings', action='index', - repo_name='vcs_test')) + repo_name=HG_REPO)) # Test response... - + def test_fork(self): self.log_user() response = self.app.get(url(controller='settings', action='fork', - repo_name='vcs_test')) - + repo_name=HG_REPO)) + def test_fork_create(self): self.log_user() - fork_name = 'vcs_test_fork' + fork_name = HG_FORK description = 'fork of vcs test' - repo_name = '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'}) - - - print response - + #test if we have a message that fork is ok assert 'fork %s repository as %s task added' \ % (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() @@ -47,9 +45,6 @@ #check if fork is marked as fork response = self.app.get(url(controller='summary', action='index', repo_name=fork_name)) - - - print response - + assert 'Fork of %s' % repo_name in response.body, 'no message about that this repo is a fork' - +