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))
response.mustcontain("""
""")
response.mustcontain(
"""
"""
)
response.mustcontain(
"""
154:"""
"""5e204e7583b9"""
)
response.mustcontain("""Small update at simplevcs app""")
response.mustcontain(
"""
3
"""
)
#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...
response.mustcontain(
"""
"""
)
response.mustcontain(
"""
64:"""
"""46ad32a4f974"""
)
response.mustcontain(
"""
21
"""
)
response.mustcontain(
"""
"""
"""46ad32a4f974""" % HG_REPO
)