Mercurial > kallithea
changeset 6836:01c216ba7e37
tests: fix test failure after 3c1cdd1c1736
The hashes that apparently only were used for toggling commit messages were
also used by tests.
This change could seem to remove some test coverage, but the removed sha check
is covered by the changeset_hash check a few lines later.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 28 Aug 2017 05:25:39 +0200 |
parents | 2f35bd7b97aa |
children | f77ef41b39aa |
files | kallithea/tests/functional/test_compare.py |
diffstat | 1 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/tests/functional/test_compare.py Tue Jul 18 20:50:49 2017 +0200 +++ b/kallithea/tests/functional/test_compare.py Mon Aug 28 05:25:39 2017 +0200 @@ -6,8 +6,8 @@ fixture = Fixture() -def _commit_div(sha, msg): - return """<div id="C-%s" class="message">%s</div>""" % (sha, msg) +def _commit_ref(sha, msg): + return '''<div class="message">%s</div>''' % msg class TestCompareController(TestController): @@ -65,8 +65,8 @@ response.mustcontain("""Showing 2 commits""") response.mustcontain("""1 file changed with 2 insertions and 0 deletions""") - response.mustcontain(_commit_div(cs1.raw_id, 'commit2')) - response.mustcontain(_commit_div(cs2.raw_id, 'commit3')) + response.mustcontain(_commit_ref(cs1.raw_id, 'commit2')) + response.mustcontain(_commit_ref(cs2.raw_id, 'commit3')) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) @@ -116,8 +116,8 @@ response.mustcontain("""Showing 2 commits""") response.mustcontain("""1 file changed with 2 insertions and 0 deletions""") - response.mustcontain(_commit_div(cs1.raw_id, 'commit2')) - response.mustcontain(_commit_div(cs2.raw_id, 'commit3')) + response.mustcontain(_commit_ref(cs1.raw_id, 'commit2')) + response.mustcontain(_commit_ref(cs2.raw_id, 'commit3')) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) @@ -175,8 +175,8 @@ response.mustcontain("""Showing 2 commits""") response.mustcontain("""1 file changed with 2 insertions and 0 deletions""") - response.mustcontain(_commit_div(cs1.raw_id, 'commit2')) - response.mustcontain(_commit_div(cs2.raw_id, 'commit3')) + response.mustcontain(_commit_ref(cs1.raw_id, 'commit2')) + response.mustcontain(_commit_ref(cs2.raw_id, 'commit3')) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) @@ -234,8 +234,8 @@ response.mustcontain("""Showing 2 commits""") response.mustcontain("""1 file changed with 2 insertions and 0 deletions""") - response.mustcontain(_commit_div(cs1.raw_id, 'commit2')) - response.mustcontain(_commit_div(cs2.raw_id, 'commit3')) + response.mustcontain(_commit_ref(cs1.raw_id, 'commit2')) + response.mustcontain(_commit_ref(cs2.raw_id, 'commit3')) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) @@ -302,9 +302,9 @@ response.mustcontain("""Showing 3 commits""") response.mustcontain("""1 file changed with 3 insertions and 0 deletions""") - response.mustcontain(_commit_div(cs2.raw_id, 'commit3')) - response.mustcontain(_commit_div(cs3.raw_id, 'commit4')) - response.mustcontain(_commit_div(cs4.raw_id, 'commit5')) + response.mustcontain(_commit_ref(cs2.raw_id, 'commit3')) + response.mustcontain(_commit_ref(cs3.raw_id, 'commit4')) + response.mustcontain(_commit_ref(cs4.raw_id, 'commit5')) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r2:%s</a>""" % (repo1.repo_name, cs2.raw_id, cs2.short_id)) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r3:%s</a>""" % (repo1.repo_name, cs3.raw_id, cs3.short_id)) @@ -368,9 +368,9 @@ response.mustcontain("""Showing 3 commits""") response.mustcontain("""1 file changed with 3 insertions and 0 deletions""") - response.mustcontain(_commit_div(cs3.raw_id, 'commit4')) - response.mustcontain(_commit_div(cs4.raw_id, 'commit5')) - response.mustcontain(_commit_div(cs5.raw_id, 'commit6')) + response.mustcontain(_commit_ref(cs3.raw_id, 'commit4')) + response.mustcontain(_commit_ref(cs4.raw_id, 'commit5')) + response.mustcontain(_commit_ref(cs5.raw_id, 'commit6')) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r3:%s</a>""" % (repo1.repo_name, cs3.raw_id, cs3.short_id)) response.mustcontain("""<a class="changeset_hash" href="/%s/changeset/%s">r4:%s</a>""" % (repo1.repo_name, cs4.raw_id, cs4.short_id))