test_changelog.py
74 lines
| 3.1 KiB
| text/x-python
|
PythonLexer
r547 | from rhodecode.tests import * | |||
r1895 | ||||
r547 | class TestChangelogController(TestController): | |||
r688 | def test_index_hg(self): | |||
r547 | self.log_user() | |||
r1436 | response = self.app.get(url(controller='changelog', action='index', | |||
repo_name=HG_REPO)) | ||||
r688 | ||||
r3550 | response.mustcontain('''id="chg_20" class="container tablerow1"''') | |||
r1895 | response.mustcontain( | |||
r2515 | """<input class="changeset_range" """ | |||
"""id="5e204e7583b9c8e7b93a020bd036564b1e731dae" """ | ||||
"""name="5e204e7583b9c8e7b93a020bd036564b1e731dae" """ | ||||
"""type="checkbox" value="1" />""" | ||||
r1895 | ) | |||
response.mustcontain( | ||||
r3550 | """<span class="changeset_id">154:</span>""" | |||
) | ||||
response.mustcontain( | ||||
"""<span class="changeset_hash">5e204e7583b9</span>""" | ||||
r1895 | ) | |||
r1707 | ||||
r1895 | response.mustcontain("""Small update at simplevcs app""") | |||
r1436 | ||||
r3550 | # response.mustcontain( | |||
# """<div id="changed_total_5e204e7583b9c8e7b93a020bd036564b1e731dae" """ | ||||
# """style="float:right;" class="changed_total tooltip" """ | ||||
# """title="Affected number of files, click to show """ | ||||
# """more details">3</div>""" | ||||
# ) | ||||
r688 | ||||
r567 | #pagination | |||
r1436 | response = self.app.get(url(controller='changelog', action='index', | |||
r2515 | repo_name=HG_REPO), {'page': 1}) | |||
r1436 | response = self.app.get(url(controller='changelog', action='index', | |||
r2515 | repo_name=HG_REPO), {'page': 2}) | |||
r1436 | response = self.app.get(url(controller='changelog', action='index', | |||
r2515 | repo_name=HG_REPO), {'page': 3}) | |||
r1436 | response = self.app.get(url(controller='changelog', action='index', | |||
r2515 | repo_name=HG_REPO), {'page': 4}) | |||
r1436 | response = self.app.get(url(controller='changelog', action='index', | |||
r2515 | repo_name=HG_REPO), {'page': 5}) | |||
r1436 | response = self.app.get(url(controller='changelog', action='index', | |||
r2515 | repo_name=HG_REPO), {'page': 6}) | |||
r688 | ||||
r1895 | # Test response after pagination... | |||
response.mustcontain( | ||||
r2515 | """<input class="changeset_range" """ | |||
"""id="46ad32a4f974e45472a898c6b0acb600320579b1" """ | ||||
"""name="46ad32a4f974e45472a898c6b0acb600320579b1" """ | ||||
"""type="checkbox" value="1" />""" | ||||
r1895 | ) | |||
response.mustcontain( | ||||
r3550 | """<span class="changeset_id">64:</span>""" | |||
) | ||||
response.mustcontain( | ||||
"""<span class="changeset_hash">46ad32a4f974</span>""" | ||||
r1895 | ) | |||
r1021 | ||||
r3550 | # response.mustcontain( | |||
# """<div id="changed_total_46ad32a4f974e45472a898c6b0acb600320579b1" """ | ||||
# """style="float:right;" class="changed_total tooltip" """ | ||||
# """title="Affected number of files, click to show """ | ||||
# """more details">21</div>""" | ||||
# ) | ||||
# | ||||
# response.mustcontain( | ||||
# """<a href="/%s/changeset/""" | ||||
# """46ad32a4f974e45472a898c6b0acb600320579b1" """ | ||||
# """title="Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4">""" | ||||
# """46ad32a4f974</a>""" % HG_REPO | ||||
# ) | ||||