Mercurial > kallithea
diff rhodecode/tests/functional/test_changelog.py @ 2031:82a88013a3fd
merge 1.3 into stable
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 26 Feb 2012 17:25:09 +0200 |
parents | 752b0a7b7679 c59cc8231f3c |
children | 63e58ef80ef1 |
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_changelog.py Sun Feb 19 20:21:14 2012 +0200 +++ b/rhodecode/tests/functional/test_changelog.py Sun Feb 26 17:25:09 2012 +0200 @@ -1,5 +1,6 @@ from rhodecode.tests import * + class TestChangelogController(TestController): def test_index_hg(self): @@ -7,23 +8,26 @@ response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO)) - self.assertTrue("""<div id="chg_20" class="container">""" - in response.body) - self.assertTrue("""<input class="changeset_range" id="5e204e7583b9" """ - """name="5e204e7583b9" type="checkbox" value="1" />""" - in response.body) - self.assertTrue("""<span>commit 154: 5e204e7583b9@2010-08-10 """ - """02:18:46</span>""" in response.body) - self.assertTrue("""Small update at simplevcs app""" in response.body) + response.mustcontain("""<div id="chg_20" class="container tablerow1">""") + response.mustcontain( + """<input class="changeset_range" id="5e204e7583b9" """ + """name="5e204e7583b9" type="checkbox" value="1" />""" + ) + response.mustcontain( + """<span class="changeset_id">154:""" + """<span class="changeset_hash">5e204e7583b9</span></span>""" + ) + response.mustcontain("""Small update at simplevcs app""") - self.assertTrue("""<span id="5e204e7583b9c8e7b93a020bd036564b1e""" - """731dae" class="changed_total tooltip" """ - """title="Affected number of files, click to """ - """show more details">3</span>""" in response.body) + response.mustcontain( + """<div id="5e204e7583b9c8e7b93a020bd036564b1e731dae" """ + """style="float:right;" class="changed_total tooltip" """ + """title="Affected number of files, click to show """ + """more details">3</div>""" + ) #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', @@ -37,25 +41,26 @@ response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':6}) - # Test response after pagination... - self.assertTrue("""<input class="changeset_range" id="46ad32a4f974" """ - """name="46ad32a4f974" type="checkbox" value="1" />""" - in response.body) - self.assertTrue("""<span>commit 64: 46ad32a4f974@2010-04-20""" - """ 01:33:21</span>"""in response.body) + response.mustcontain( + """<input class="changeset_range" id="46ad32a4f974" """ + """name="46ad32a4f974" type="checkbox" value="1" />""" + ) + response.mustcontain( + """<span class="changeset_id">64:""" + """<span class="changeset_hash">46ad32a4f974</span></span>""" + ) - self.assertTrue("""<span id="46ad32a4f974e45472a898c6b0acb600320""" - """579b1" class="changed_total tooltip" """ - """title="Affected number of files, click to """ - """show more details">21</span>"""in response.body) - self.assertTrue("""<div class="message"><a href="/%s/changeset/""" - """46ad32a4f974e45472a898c6b0acb600320579b1">""" - """Merge with 2e6a2bf9356ca56df08807f4ad86d48""" - """0da72a8f4</a></div>""" % HG_REPO in response.body) + response.mustcontain( + """<div id="46ad32a4f974e45472a898c6b0acb600320579b1" """ + """style="float:right;" class="changed_total tooltip" """ + """title="Affected number of files, click to show """ + """more details">21</div>""" + ) - - - #def test_index_git(self): - # self.log_user() - # response = self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO)) + response.mustcontain( + """<a href="/%s/changeset/""" + """46ad32a4f974e45472a898c6b0acb600320579b1" """ + """title="Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4">""" + """46ad32a4f974</a>""" % HG_REPO + )