Mercurial > kallithea
annotate rhodecode/tests/functional/test_changelog.py @ 639:45e1fdc0082c
Version bump,freeze of dependent libs.
Little test update
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 02 Nov 2010 20:19:05 +0100 |
parents | 80dc0a23edf7 |
children | 3d0661b8aaa4 |
rev | line source |
---|---|
547
1e757ac98988
renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
473
diff
changeset
|
1 from rhodecode.tests import * |
93
aec4c0071cb3
added empty controllers for branches tags files graph, routing and test for them
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 |
aec4c0071cb3
added empty controllers for branches tags files graph, routing and test for them
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 class TestChangelogController(TestController): |
aec4c0071cb3
added empty controllers for branches tags files graph, routing and test for them
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 |
aec4c0071cb3
added empty controllers for branches tags files graph, routing and test for them
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 def test_index(self): |
473
6b934c9607e7
Improved testing scenarios. Made test env creator
Marcin Kuzminski <marcin@python-works.com>
parents:
459
diff
changeset
|
6 self.log_user() |
567
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
7 response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test')) |
639
45e1fdc0082c
Version bump,freeze of dependent libs.
Marcin Kuzminski <marcin@python-works.com>
parents:
567
diff
changeset
|
8 |
45e1fdc0082c
Version bump,freeze of dependent libs.
Marcin Kuzminski <marcin@python-works.com>
parents:
567
diff
changeset
|
9 assert """<div id="chg_20" class="container">""" in response.body, 'wrong info about number of changes' |
567
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
10 assert """Small update at simplevcs app""" in response.body, 'missing info about commit message' |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
11 assert """<span class="removed" title="removed">0</span>""" in response.body, 'wrong info about removed nodes' |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
12 assert """<span class="changed" title="changed">2</span>""" in response.body, 'wrong info about changed nodes' |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
13 assert """<span class="added" title="added">1</span>""" in response.body, 'wrong info about added nodes' |
639
45e1fdc0082c
Version bump,freeze of dependent libs.
Marcin Kuzminski <marcin@python-works.com>
parents:
567
diff
changeset
|
14 |
567
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
15 #pagination |
639
45e1fdc0082c
Version bump,freeze of dependent libs.
Marcin Kuzminski <marcin@python-works.com>
parents:
567
diff
changeset
|
16 |
567
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
17 response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':1}) |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
18 response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':2}) |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
19 response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':3}) |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
20 response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':4}) |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
21 response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':5}) |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
22 response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'), {'page':6}) |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
23 # Test response after pagination... |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
24 |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
25 assert """<span class="removed" title="removed">20</span>"""in response.body, 'wrong info about number of removed' |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
26 assert """<span class="changed" title="changed">1</span>"""in response.body, 'wrong info about number of changes' |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
27 assert """<span class="added" title="added">0</span>"""in response.body, 'wrong info about number of added' |
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
28 assert """<div class="date">commit 64: 46ad32a4f974@2010-04-20 00:33:21</div>"""in response.body, 'wrong info about commit 64' |
639
45e1fdc0082c
Version bump,freeze of dependent libs.
Marcin Kuzminski <marcin@python-works.com>
parents:
567
diff
changeset
|
29 |
567
80dc0a23edf7
fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
30 assert """<div class="message"><a href="/vcs_test/changeset/46ad32a4f974">Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4</a></div>"""in response.body, 'wrong info about commit 64 is a merge' |