comparison rhodecode/tests/functional/test_compare.py @ 3320:75431548602a beta

fixed broken swap url, and added a test to detect it in feature
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 04 Feb 2013 02:18:44 +0100
parents 8f987997cffb
children c9b0f1d363c7
comparison
equal deleted inserted replaced
3319:6d75dfb6b8ed 3320:75431548602a
107 107
108 response.mustcontain("""<a href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) 108 response.mustcontain("""<a href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id))
109 response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) 109 response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
110 ## files 110 ## files
111 response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?other_repo=%s#C--826e8142e6ba">file1</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name)) 111 response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?other_repo=%s#C--826e8142e6ba">file1</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
112 112 #swap
113 response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?as_form=None&amp;other_repo=%s">[swap]</a>""" % (repo1.repo_name, rev1, rev2, repo2.repo_name))
113 finally: 114 finally:
114 RepoModel().delete(r2_id) 115 RepoModel().delete(r2_id)
115 RepoModel().delete(r1_id) 116 RepoModel().delete(r1_id)
116 117
117 def test_compare_forks_on_branch_extra_commits_origin_has_incomming_hg(self): 118 def test_compare_forks_on_branch_extra_commits_origin_has_incomming_hg(self):
164 165
165 response.mustcontain("""<a href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) 166 response.mustcontain("""<a href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id))
166 response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) 167 response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
167 ## files 168 ## files
168 response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?other_repo=%s#C--826e8142e6ba">file1</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name)) 169 response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?other_repo=%s#C--826e8142e6ba">file1</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
169 170 #swap
171 response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?as_form=None&amp;other_repo=%s">[swap]</a>""" % (repo1.repo_name, rev1, rev2, repo2.repo_name))
170 finally: 172 finally:
171 RepoModel().delete(r2_id) 173 RepoModel().delete(r2_id)
172 RepoModel().delete(r1_id) 174 RepoModel().delete(r1_id)
173 175
174 176