Mercurial > kallithea
comparison 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 |
comparison
equal
deleted
inserted
replaced
2005:ab0e122b38a7 | 2031:82a88013a3fd |
---|---|
1 from rhodecode.tests import * | 1 from rhodecode.tests import * |
2 | |
2 | 3 |
3 class TestChangelogController(TestController): | 4 class TestChangelogController(TestController): |
4 | 5 |
5 def test_index_hg(self): | 6 def test_index_hg(self): |
6 self.log_user() | 7 self.log_user() |
7 response = self.app.get(url(controller='changelog', action='index', | 8 response = self.app.get(url(controller='changelog', action='index', |
8 repo_name=HG_REPO)) | 9 repo_name=HG_REPO)) |
9 | 10 |
10 self.assertTrue("""<div id="chg_20" class="container">""" | 11 response.mustcontain("""<div id="chg_20" class="container tablerow1">""") |
11 in response.body) | 12 response.mustcontain( |
12 self.assertTrue("""<input class="changeset_range" id="5e204e7583b9" """ | 13 """<input class="changeset_range" id="5e204e7583b9" """ |
13 """name="5e204e7583b9" type="checkbox" value="1" />""" | 14 """name="5e204e7583b9" type="checkbox" value="1" />""" |
14 in response.body) | 15 ) |
15 self.assertTrue("""<span>commit 154: 5e204e7583b9@2010-08-10 """ | 16 response.mustcontain( |
16 """02:18:46</span>""" in response.body) | 17 """<span class="changeset_id">154:""" |
17 self.assertTrue("""Small update at simplevcs app""" in response.body) | 18 """<span class="changeset_hash">5e204e7583b9</span></span>""" |
19 ) | |
18 | 20 |
21 response.mustcontain("""Small update at simplevcs app""") | |
19 | 22 |
20 self.assertTrue("""<span id="5e204e7583b9c8e7b93a020bd036564b1e""" | 23 response.mustcontain( |
21 """731dae" class="changed_total tooltip" """ | 24 """<div id="5e204e7583b9c8e7b93a020bd036564b1e731dae" """ |
22 """title="Affected number of files, click to """ | 25 """style="float:right;" class="changed_total tooltip" """ |
23 """show more details">3</span>""" in response.body) | 26 """title="Affected number of files, click to show """ |
27 """more details">3</div>""" | |
28 ) | |
24 | 29 |
25 #pagination | 30 #pagination |
26 | |
27 response = self.app.get(url(controller='changelog', action='index', | 31 response = self.app.get(url(controller='changelog', action='index', |
28 repo_name=HG_REPO), {'page':1}) | 32 repo_name=HG_REPO), {'page':1}) |
29 response = self.app.get(url(controller='changelog', action='index', | 33 response = self.app.get(url(controller='changelog', action='index', |
30 repo_name=HG_REPO), {'page':2}) | 34 repo_name=HG_REPO), {'page':2}) |
31 response = self.app.get(url(controller='changelog', action='index', | 35 response = self.app.get(url(controller='changelog', action='index', |
35 response = self.app.get(url(controller='changelog', action='index', | 39 response = self.app.get(url(controller='changelog', action='index', |
36 repo_name=HG_REPO), {'page':5}) | 40 repo_name=HG_REPO), {'page':5}) |
37 response = self.app.get(url(controller='changelog', action='index', | 41 response = self.app.get(url(controller='changelog', action='index', |
38 repo_name=HG_REPO), {'page':6}) | 42 repo_name=HG_REPO), {'page':6}) |
39 | 43 |
44 # Test response after pagination... | |
45 response.mustcontain( | |
46 """<input class="changeset_range" id="46ad32a4f974" """ | |
47 """name="46ad32a4f974" type="checkbox" value="1" />""" | |
48 ) | |
49 response.mustcontain( | |
50 """<span class="changeset_id">64:""" | |
51 """<span class="changeset_hash">46ad32a4f974</span></span>""" | |
52 ) | |
40 | 53 |
41 # Test response after pagination... | 54 response.mustcontain( |
42 self.assertTrue("""<input class="changeset_range" id="46ad32a4f974" """ | 55 """<div id="46ad32a4f974e45472a898c6b0acb600320579b1" """ |
43 """name="46ad32a4f974" type="checkbox" value="1" />""" | 56 """style="float:right;" class="changed_total tooltip" """ |
44 in response.body) | 57 """title="Affected number of files, click to show """ |
45 self.assertTrue("""<span>commit 64: 46ad32a4f974@2010-04-20""" | 58 """more details">21</div>""" |
46 """ 01:33:21</span>"""in response.body) | 59 ) |
47 | 60 |
48 self.assertTrue("""<span id="46ad32a4f974e45472a898c6b0acb600320""" | 61 response.mustcontain( |
49 """579b1" class="changed_total tooltip" """ | 62 """<a href="/%s/changeset/""" |
50 """title="Affected number of files, click to """ | 63 """46ad32a4f974e45472a898c6b0acb600320579b1" """ |
51 """show more details">21</span>"""in response.body) | 64 """title="Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4">""" |
52 self.assertTrue("""<div class="message"><a href="/%s/changeset/""" | 65 """46ad32a4f974</a>""" % HG_REPO |
53 """46ad32a4f974e45472a898c6b0acb600320579b1">""" | 66 ) |
54 """Merge with 2e6a2bf9356ca56df08807f4ad86d48""" | |
55 """0da72a8f4</a></div>""" % HG_REPO in response.body) | |
56 | |
57 | |
58 | |
59 #def test_index_git(self): | |
60 # self.log_user() | |
61 # response = self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO)) |