Show More
@@ -1,5 +1,6 b'' | |||||
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): | |
@@ -7,21 +8,24 b' class TestChangelogController(TestContro' | |||||
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 |
se |
|
11 | response.mustcontain("""<div id="chg_20" class="container tablerow1">""") | |
11 | in response.body) |
|
12 | response.mustcontain( | |
12 |
|
|
13 | """<input class="changeset_range" id="5e204e7583b9" """ | |
13 |
|
|
14 | """name="5e204e7583b9" type="checkbox" value="1" />""" | |
14 | in response.body) |
|
15 | ) | |
15 | self.assertTrue("""<span>commit 154: 5e204e7583b9@2010-08-09 """ |
|
16 | response.mustcontain( | |
16 | """23:18:46</span>""" in response.body) |
|
17 | """<span class="changeset_id">154:""" | |
|
18 | """<span class="changeset_hash">5e204e7583b9</span></span>""" | |||
|
19 | ) | |||
17 |
|
20 | |||
18 |
se |
|
21 | response.mustcontain("""Small update at simplevcs app""") | |
19 |
|
||||
20 |
|
22 | |||
21 | self.assertTrue("""<span id="5e204e7583b9c8e7b93a020bd036564b1e""" |
|
23 | response.mustcontain( | |
22 | """731dae" class="changed_total tooltip" """ |
|
24 | """<div id="5e204e7583b9c8e7b93a020bd036564b1e731dae" """ | |
23 | """title="Affected number of files, click to """ |
|
25 | """style="float:right;" class="changed_total tooltip" """ | |
24 | """show more details">3</span>""" in response.body) |
|
26 | """title="Affected number of files, click to show """ | |
|
27 | """more details">3</div>""" | |||
|
28 | ) | |||
25 |
|
29 | |||
26 | #pagination |
|
30 | #pagination | |
27 | response = self.app.get(url(controller='changelog', action='index', |
|
31 | response = self.app.get(url(controller='changelog', action='index', | |
@@ -37,19 +41,24 b' class TestChangelogController(TestContro' | |||||
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-19""" |
|
58 | """more details">21</div>""" | |
46 | """ 22:33:21</span>"""in response.body) |
|
59 | ) | |
47 |
|
60 | |||
48 | self.assertTrue("""<span id="46ad32a4f974e45472a898c6b0acb600320""" |
|
61 | response.mustcontain("""<div class="message"><a href="/%s/changeset/""" | |
49 | """579b1" class="changed_total tooltip" """ |
|
|||
50 | """title="Affected number of files, click to """ |
|
|||
51 | """show more details">21</span>"""in response.body) |
|
|||
52 | self.assertTrue("""<div class="message"><a href="/%s/changeset/""" |
|
|||
53 | """46ad32a4f974e45472a898c6b0acb600320579b1">""" |
|
62 | """46ad32a4f974e45472a898c6b0acb600320579b1">""" | |
54 | """Merge with 2e6a2bf9356ca56df08807f4ad86d48""" |
|
63 | """Merge with 2e6a2bf9356ca56df08807f4ad86d48""" | |
55 |
"""0da72a8f4</a></div>""" % HG_REPO |
|
64 | """0da72a8f4</a></div>""" % HG_REPO) |
@@ -13,12 +13,16 b' class TestSummaryController(TestControll' | |||||
13 | repo_name=HG_REPO)) |
|
13 | repo_name=HG_REPO)) | |
14 |
|
14 | |||
15 | #repo type |
|
15 | #repo type | |
16 | response.mustcontain("""<img style="margin-bottom:2px" class="icon" """ |
|
16 | response.mustcontain( | |
17 | """title="Mercurial repository" alt="Mercurial """ |
|
17 | """<img style="margin-bottom:2px" class="icon" """ | |
18 | """repository" src="/images/icons/hgicon.png"/>""") |
|
18 | """title="Mercurial repository" alt="Mercurial """ | |
19 | response.mustcontain("""<img style="margin-bottom:2px" class="icon" """ |
|
19 | """repository" src="/images/icons/hgicon.png"/>""" | |
20 | """title="public repository" alt="public """ |
|
20 | ) | |
21 | """repository" src="/images/icons/lock_open.png"/>""") |
|
21 | response.mustcontain( | |
|
22 | """<img style="margin-bottom:2px" class="icon" """ | |||
|
23 | """title="public repository" alt="public """ | |||
|
24 | """repository" src="/images/icons/lock_open.png"/>""" | |||
|
25 | ) | |||
22 |
|
26 | |||
23 | #codes stats |
|
27 | #codes stats | |
24 | self._enable_stats() |
|
28 | self._enable_stats() | |
@@ -26,15 +30,15 b' class TestSummaryController(TestControll' | |||||
26 | invalidate_cache('get_repo_cached_%s' % HG_REPO) |
|
30 | invalidate_cache('get_repo_cached_%s' % HG_REPO) | |
27 | response = self.app.get(url(controller='summary', action='index', |
|
31 | response = self.app.get(url(controller='summary', action='index', | |
28 | repo_name=HG_REPO)) |
|
32 | repo_name=HG_REPO)) | |
29 |
|
33 | response.mustcontain( | ||
30 |
|
|
34 | """var data = [["py", {"count": 42, "desc": ["Python"]}], """ | |
31 |
|
|
35 | """["rst", {"count": 11, "desc": ["Rst"]}], """ | |
32 |
|
|
36 | """["sh", {"count": 2, "desc": ["Bash"]}], """ | |
33 |
|
|
37 | """["makefile", {"count": 1, "desc": ["Makefile", "Makefile"]}],""" | |
34 |
|
|
38 | """ ["cfg", {"count": 1, "desc": ["Ini"]}], """ | |
35 |
|
|
39 | """["css", {"count": 1, "desc": ["Css"]}], """ | |
36 |
|
|
40 | """["bat", {"count": 1, "desc": ["Batch"]}]];""" | |
37 | in response.body) |
|
41 | ) | |
38 |
|
42 | |||
39 | # clone url... |
|
43 | # clone url... | |
40 | response.mustcontain("""<input style="width:80%;margin-left:105px" type="text" id="clone_url" readonly="readonly" value="http://test_admin@localhost:80/vcs_test_hg"/>""") |
|
44 | response.mustcontain("""<input style="width:80%;margin-left:105px" type="text" id="clone_url" readonly="readonly" value="http://test_admin@localhost:80/vcs_test_hg"/>""") |
General Comments 0
You need to be logged in to leave comments.
Login now