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 @@ -1,5 +1,6 @@ from rhodecode.tests import * + class TestChangelogController(TestController): def test_index_hg(self): @@ -7,21 +8,24 @@ class TestChangelogController(TestContro 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-09 """ - """23:18:46""" in response.body) + response.mustcontain("""
""") + response.mustcontain( + """""" + ) + response.mustcontain( + """154:""" + """5e204e7583b9""" + ) - self.assertTrue("""Small update at simplevcs app""" in response.body) - + response.mustcontain("""Small update at simplevcs app""") - self.assertTrue("""3""" in response.body) + response.mustcontain( + """
3
""" + ) #pagination response = self.app.get(url(controller='changelog', action='index', @@ -37,19 +41,24 @@ class TestChangelogController(TestContro 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""" + ) - # Test response after pagination... - self.assertTrue("""""" - in response.body) - self.assertTrue("""commit 64: 46ad32a4f974@2010-04-19""" - """ 22:33:21"""in response.body) + response.mustcontain( + """
21
""" + ) - self.assertTrue("""21"""in response.body) - self.assertTrue("""""" % HG_REPO in response.body) + """0da72a8f4
""" % HG_REPO) diff --git a/rhodecode/tests/functional/test_summary.py b/rhodecode/tests/functional/test_summary.py --- a/rhodecode/tests/functional/test_summary.py +++ b/rhodecode/tests/functional/test_summary.py @@ -13,12 +13,16 @@ class TestSummaryController(TestControll repo_name=HG_REPO)) #repo type - response.mustcontain("""Mercurial """) - response.mustcontain("""public """) + response.mustcontain( + """Mercurial """ + ) + response.mustcontain( + """public """ + ) #codes stats self._enable_stats() @@ -26,15 +30,15 @@ class TestSummaryController(TestControll invalidate_cache('get_repo_cached_%s' % HG_REPO) response = self.app.get(url(controller='summary', action='index', repo_name=HG_REPO)) - - self.assertTrue("""var data = {"py": {"count": 42, "desc": """ - """["Python"]}, "rst": {"count": 11, "desc": """ - """["Rst"]}, "sh": {"count": 2, "desc": ["Bash"]}, """ - """"makefile": {"count": 1, "desc": ["Makefile", """ - """"Makefile"]}, "cfg": {"count": 1, "desc": ["Ini"]},""" - """ "css": {"count": 1, "desc": ["Css"]}, "bat": """ - """{"count": 1, "desc": ["Batch"]}};""" - in response.body) + response.mustcontain( + """var data = [["py", {"count": 42, "desc": ["Python"]}], """ + """["rst", {"count": 11, "desc": ["Rst"]}], """ + """["sh", {"count": 2, "desc": ["Bash"]}], """ + """["makefile", {"count": 1, "desc": ["Makefile", "Makefile"]}],""" + """ ["cfg", {"count": 1, "desc": ["Ini"]}], """ + """["css", {"count": 1, "desc": ["Css"]}], """ + """["bat", {"count": 1, "desc": ["Batch"]}]];""" + ) # clone url... response.mustcontain("""""")