##// END OF EJS Templates
user defined permission will update the global permissions, and overwrite default settings.
user defined permission will update the global permissions, and overwrite default settings.

File last commit:

r1219:ca614631 default
r1267:d534aff5 beta
Show More
test_changelog.py
41 lines | 3.9 KiB | text/x-python | PythonLexer
renamed project to rhodecode
r547 from rhodecode.tests import *
class TestChangelogController(TestController):
Tests rewrite for 1.2 added some globals configs to make tests easier....
r688 def test_index_hg(self):
renamed project to rhodecode
r547 self.log_user()
Tests rewrite for 1.2 added some globals configs to make tests easier....
r688 response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO))
assert """<div id="chg_20" class="container">""" in response.body, 'wrong info about number of changes'
fixed tests
r1021 assert """<input class="changeset_range" id="5e204e7583b9" name="5e204e7583b9" type="checkbox" value="1" />""" in response.body, 'no checkbox for this commit'
assert """<span>commit 154: 5e204e7583b9@2010-08-10 01:18:46</span>""" in response.body , 'no info on this commit'
fixed whoosh failure on new repository...
r567 assert """Small update at simplevcs app""" in response.body, 'missing info about commit message'
fixed tests
r1021
assert """<span class="removed tooltip" title="<b>removed</b>: No Files">0</span>""" in response.body, 'wrong info about removed nodes'
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'
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'
Tests rewrite for 1.2 added some globals configs to make tests easier....
r688
fixed whoosh failure on new repository...
r567 #pagination
Tests rewrite for 1.2 added some globals configs to make tests easier....
r688
response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':1})
response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':2})
response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':3})
response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':4})
response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':5})
response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':6})
fixed tests
r1021
fixed whoosh failure on new repository...
r567 # Test response after pagination...
fixed tests
r1021 print response.body
assert """<input class="changeset_range" id="46ad32a4f974" name="46ad32a4f974" type="checkbox" value="1" />""" in response.body, 'no checkbox for this commit'
assert """<span>commit 64: 46ad32a4f974@2010-04-20 00:33:21</span>"""in response.body, 'wrong info about commit 64'
assert """<span class="removed tooltip" title="<b>removed</b>: <br/> docs/api.rst">1</span>"""in response.body, 'wrong info about number of removed'
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'
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'
Tests rewrite for 1.2 added some globals configs to make tests easier....
r688 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'
#def test_index_git(self):
# self.log_user()
# response = self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO))