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('''id="chg_20" class="container tablerow1"''') response.mustcontain( """""" ) response.mustcontain( """r154:5e204e7583b9""" ) response.mustcontain("""Small update at simplevcs app""") # response.mustcontain( # """
3
""" # ) def test_index_pagination_hg(self): self.log_user() #pagination self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page': 1}) self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page': 2}) self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page': 3}) self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page': 4}) 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( """r64:46ad32a4f974""" ) # response.mustcontain( # """
21
""" # ) # # response.mustcontain( # """""" # """46ad32a4f974""" % HG_REPO # ) def test_index_git(self): self.log_user() response = self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO)) response.mustcontain('''id="chg_20" class="container tablerow1"''') response.mustcontain( """""" ) response.mustcontain( """r613:95f9a91d775b""" ) response.mustcontain("""fixing stupid typo in context for mercurial""") # response.mustcontain( # """
3
""" # ) def test_index_pagination_git(self): self.log_user() #pagination self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO), {'page': 1}) self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO), {'page': 2}) self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO), {'page': 3}) self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO), {'page': 4}) self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO), {'page': 5}) response = self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO), {'page': 6}) # Test response after pagination... response.mustcontain( """""" ) response.mustcontain( """r515:636ed213f2f1""" )