##// END OF EJS Templates
fixed tests
marcink -
r814:65332500 beta
parent child Browse files
Show More
@@ -1,36 +1,38 b''
1 1 from rhodecode.tests import *
2 2
3 3 class TestChangelogController(TestController):
4 4
5 5 def test_index_hg(self):
6 6 self.log_user()
7 7 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO))
8 8
9 print response.body
9 10 assert """<div id="chg_20" class="container">""" in response.body, 'wrong info about number of changes'
11 assert """<div class="date">commit 154: 5e204e7583b9@2010-08-10 01:18:46</div>""" in response.body , 'no info on this commit'
10 12 assert """Small update at simplevcs app""" in response.body, 'missing info about commit message'
11 assert """<span class="removed" title="removed: ">0</span>""" in response.body, 'wrong info about removed nodes'
12 assert """<span class="changed" title="changed: hg.py | models.py">2</span>""" in response.body, 'wrong info about changed nodes'
13 assert """<span class="added" title="added: managers.py">1</span>""" in response.body, 'wrong info about added nodes'
13 assert """<span class="removed tooltip" tooltip_title="removed: No Files">0</span>""" in response.body, 'wrong info about removed nodes'
14 assert """<span class="changed tooltip" tooltip_title="changed: vcs/backends/hg.py<br/> vcs/web/simplevcs/models.py">2</span>""" in response.body, 'wrong info about changed nodes'
15 assert """<span class="added tooltip" tooltip_title="added: vcs/web/simplevcs/managers.py">1</span>""" in response.body, 'wrong info about added nodes'
14 16
15 17 #pagination
16 18
17 19 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':1})
18 20 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':2})
19 21 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':3})
20 22 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':4})
21 23 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':5})
22 24 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':6})
23 25
24 26 # Test response after pagination...
25
27 print response.body
26 28 assert """<div class="date">commit 64: 46ad32a4f974@2010-04-20 00:33:21</div>"""in response.body, 'wrong info about commit 64'
27 assert """<span class="removed" title="removed: api.rst">1</span>"""in response.body, 'wrong info about number of removed'
28 assert """<span class="changed" title="changed: .hgignore | README.rst | conf.py | index.rst | setup.py | test_hg.py | test_nodes.py | __init__.py | __init__.py | base.py | hg.py | nodes.py | __init__.py">13</span>"""in response.body, 'wrong info about number of changes'
29 assert """<span class="added" title="added: hg.rst | index.rst | index.rst | nodes.rst | index.rst | simplevcs.rst | installation.rst | quickstart.rst | setup.cfg | baseui_config.py | web.py | __init__.py | exceptions.py | __init__.py | exceptions.py | middleware.py | models.py | settings.py | utils.py | views.py">20</span>"""in response.body, 'wrong info about number of added'
29 assert """<span class="removed tooltip" tooltip_title="removed: docs/api.rst">1</span>"""in response.body, 'wrong info about number of removed'
30 assert """<span class="changed tooltip" tooltip_title="changed: .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'
31 assert """<span class="added tooltip" tooltip_title="added: 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'
30 32 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'
31 33
32 34
33 35
34 36 #def test_index_git(self):
35 37 # self.log_user()
36 38 # response = self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO))
General Comments 0
You need to be logged in to leave comments. Login now