annotate rhodecode/tests/functional/test_changelog.py @ 1047:15b60f83420c beta

tests update
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 15 Feb 2011 01:36:50 +0100
parents 0ea8eca2d63e
children 88d13c1c6a55
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
5 def test_index_hg(self):
473
6b934c9607e7 Improved testing scenarios. Made test env creator
Marcin Kuzminski <marcin@python-works.com>
parents: 459
diff changeset
6 self.log_user()
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
7 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO))
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
8
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
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'
1021
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
10 assert """<input class="changeset_range" id="5e204e7583b9" name="5e204e7583b9" type="checkbox" value="1" />""" in response.body, 'no checkbox for this commit'
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
11 assert """<span>commit 154: 5e204e7583b9@2010-08-10 01:18:46</span>""" in response.body , 'no info on this commit'
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
12 assert """Small update at simplevcs app""" in response.body, 'missing info about commit message'
1021
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
13
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
14 assert """<span class="removed tooltip" title="<b>removed</b>: No Files">0</span>""" in response.body, 'wrong info about removed nodes'
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
15 assert """<span class="changed tooltip" title="<b>changed</b>: <br/> vcs/backends/hg.py<br/> vcs/web/simplevcs/models.py">2</span>""" in response.body, 'wrong info about changed nodes'
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
16 assert """<span class="added tooltip" title="<b>added</b>: <br/> vcs/web/simplevcs/managers.py">1</span>""" in response.body, 'wrong info about added nodes'
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
17
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
18 #pagination
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
19
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
20 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':1})
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
21 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':2})
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
22 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':3})
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
23 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':4})
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
24 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':5})
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
25 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':6})
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
26
1021
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
27
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
28 # Test response after pagination...
1021
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
29 print response.body
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
30 assert """<input class="changeset_range" id="46ad32a4f974" name="46ad32a4f974" type="checkbox" value="1" />""" in response.body, 'no checkbox for this commit'
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
31 assert """<span>commit 64: 46ad32a4f974@2010-04-20 00:33:21</span>"""in response.body, 'wrong info about commit 64'
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
32 assert """<span class="removed tooltip" title="<b>removed</b>: <br/> docs/api.rst">1</span>"""in response.body, 'wrong info about number of removed'
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
33 assert """<span class="changed tooltip" title="<b>changed</b>: <br/> .hgignore<br/> README.rst<br/> docs/conf.py<br/> docs/index.rst<br/> setup.py<br/> tests/test_hg.py<br/> tests/test_nodes.py<br/> vcs/__init__.py<br/> vcs/backends/__init__.py<br/> vcs/backends/base.py<br/> vcs/backends/hg.py<br/> vcs/nodes.py<br/> vcs/utils/__init__.py">13</span>"""in response.body, 'wrong info about number of changes'
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
34 assert """<span class="added tooltip" title="<b>added</b>: <br/> docs/api/backends/hg.rst<br/> docs/api/backends/index.rst<br/> docs/api/index.rst<br/> docs/api/nodes.rst<br/> docs/api/web/index.rst<br/> docs/api/web/simplevcs.rst<br/> docs/installation.rst<br/> docs/quickstart.rst<br/> setup.cfg<br/> vcs/utils/baseui_config.py<br/> vcs/utils/web.py<br/> vcs/web/__init__.py<br/> vcs/web/exceptions.py<br/> vcs/web/simplevcs/__init__.py<br/> vcs/web/simplevcs/exceptions.py<br/> vcs/web/simplevcs/middleware.py<br/> vcs/web/simplevcs/models.py<br/> vcs/web/simplevcs/settings.py<br/> vcs/web/simplevcs/utils.py<br/> vcs/web/simplevcs/views.py">20</span>"""in response.body, 'wrong info about number of added'
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
35 assert """<div class="message"><a href="/%s/changeset/46ad32a4f974e45472a898c6b0acb600320579b1">Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4</a></div>""" % HG_REPO in response.body, 'wrong info about commit 64 is a merge'
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
36
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
37
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
38
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
39 #def test_index_git(self):
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
40 # self.log_user()
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
41 # response = self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO))