diff --git a/rhodecode/tests/functional/test_changelog.py b/rhodecode/tests/functional/test_changelog.py --- a/rhodecode/tests/functional/test_changelog.py +++ b/rhodecode/tests/functional/test_changelog.py @@ -2,30 +2,35 @@ from rhodecode.tests import * class TestChangelogController(TestController): - def test_index(self): + def test_index_hg(self): self.log_user() - response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test')) - - print response - assert """
""" in response.body, 'wrong info about number ofchanges' + response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO)) + + assert """
""" in response.body, 'wrong info about number of changes' assert """Small update at simplevcs app""" in response.body, 'missing info about commit message' - assert """0""" in response.body, 'wrong info about removed nodes' - assert """2""" in response.body, 'wrong info about changed nodes' - assert """1""" in response.body, 'wrong info about added nodes' - + assert """0""" in response.body, 'wrong info about removed nodes' + assert """2""" in response.body, 'wrong info about changed nodes' + assert """1""" in response.body, 'wrong info about added nodes' + #pagination - - response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':1}) - response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':2}) - response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':3}) - response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':4}) - response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':5}) - response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':6}) + + response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':1}) + response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':2}) + response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':3}) + response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':4}) + response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':5}) + response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':6}) + # Test response after pagination... - assert """20"""in response.body, 'wrong info about number of removed' - assert """1"""in response.body, 'wrong info about number of changes' - assert """0"""in response.body, 'wrong info about number of added' assert """
commit 64: 46ad32a4f974@2010-04-20 00:33:21
"""in response.body, 'wrong info about commit 64' - assert """"""in response.body, 'wrong info about commit 64 is a merge' - + assert """1"""in response.body, 'wrong info about number of removed' + assert """13"""in response.body, 'wrong info about number of changes' + assert """20"""in response.body, 'wrong info about number of added' + assert """""" % HG_REPO in response.body, 'wrong info about commit 64 is a merge' + + + + #def test_index_git(self): + # self.log_user() + # response = self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO))