from rhodecode.tests import *
class TestChangelogController(TestController):
def test_index_hg(self):
self.log_user()
response = self.app.get(url(controller='changelog', action='index',
repo_name=HG_REPO))
self.assertTrue("""
"""
in response.body)
self.assertTrue("""
"""
in response.body)
self.assertTrue("""
commit 154: 5e204e7583b9@2010-08-10 """
"""01:18:46""" in response.body)
self.assertTrue("""Small update at simplevcs app""" in response.body)
self.assertTrue("""
3""" in response.body)
#pagination
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...
self.assertTrue("""
"""
in response.body)
self.assertTrue("""
commit 64: 46ad32a4f974@2010-04-20"""
""" 00:33:21"""in response.body)
self.assertTrue("""
21"""in response.body)
self.assertTrue("""
""" % HG_REPO in response.body)
#def test_index_git(self):
# self.log_user()
# response = self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO))