##// END OF EJS Templates
Added ini config maker with dynamic variable replacements....
Added ini config maker with dynamic variable replacements. Used internally for creating dynamic configs in automated enviroments. Later this will replace old make-config from paster

File last commit:

r3960:5293d4bb merge default
r4011:4959e22a default
Show More
test_changelog.py
153 lines | 6.8 KiB | text/x-python | PythonLexer
renamed project to rhodecode
r547 from rhodecode.tests import *
test fixes for latest changes
r1895
renamed project to rhodecode
r547 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()
removed users_group controller in replace for model methods,...
r1436 response = self.app.get(url(controller='changelog', action='index',
repo_name=HG_REPO))
Tests rewrite for 1.2 added some globals configs to make tests easier....
r688
Repo size - show just the size without duplicating text...
r3550 response.mustcontain('''id="chg_20" class="container tablerow1"''')
test fixes for latest changes
r1895 response.mustcontain(
fixed few test failures
r2515 """<input class="changeset_range" """
synced vcs with upstream...
r3797 """id="7b22a518347bb9bc19679f6af07cd0a61bfe16e7" """
"""name="7b22a518347bb9bc19679f6af07cd0a61bfe16e7" """
fixed few test failures
r2515 """type="checkbox" value="1" />"""
test fixes for latest changes
r1895 )
synced vcs with upstream...
r3797 #rev 640: code garden
test fixes for latest changes
r1895 response.mustcontain(
synced vcs with upstream...
r3797 """<span class="changeset_hash">r640:0a4e54a44604</span>"""
test fixes for latest changes
r1895 )
synced vcs with upstream...
r3797 response.mustcontain("""code garden""")
Tests rewrite for 1.2 added some globals configs to make tests easier....
r688
Implemented show_id function that is a configurable way to display sha hashes in the changelog.
r3557 def test_index_pagination_hg(self):
self.log_user()
fixed whoosh failure on new repository...
r567 #pagination
Implemented show_id function that is a configurable way to display sha hashes in the changelog.
r3557 self.app.get(url(controller='changelog', action='index',
fixed few test failures
r2515 repo_name=HG_REPO), {'page': 1})
Implemented show_id function that is a configurable way to display sha hashes in the changelog.
r3557 self.app.get(url(controller='changelog', action='index',
fixed few test failures
r2515 repo_name=HG_REPO), {'page': 2})
Implemented show_id function that is a configurable way to display sha hashes in the changelog.
r3557 self.app.get(url(controller='changelog', action='index',
fixed few test failures
r2515 repo_name=HG_REPO), {'page': 3})
Implemented show_id function that is a configurable way to display sha hashes in the changelog.
r3557 self.app.get(url(controller='changelog', action='index',
fixed few test failures
r2515 repo_name=HG_REPO), {'page': 4})
Implemented show_id function that is a configurable way to display sha hashes in the changelog.
r3557 self.app.get(url(controller='changelog', action='index',
fixed few test failures
r2515 repo_name=HG_REPO), {'page': 5})
removed users_group controller in replace for model methods,...
r1436 response = self.app.get(url(controller='changelog', action='index',
fixed few test failures
r2515 repo_name=HG_REPO), {'page': 6})
Tests rewrite for 1.2 added some globals configs to make tests easier....
r688
test fixes for latest changes
r1895 # Test response after pagination...
response.mustcontain(
fixed few test failures
r2515 """<input class="changeset_range" """
synced vcs with upstream...
r3797 """id="22baf968d547386b9516965ce89d189665003a31" """
"""name="22baf968d547386b9516965ce89d189665003a31" """
fixed few test failures
r2515 """type="checkbox" value="1" />"""
test fixes for latest changes
r1895 )
Implemented show_id function that is a configurable way to display sha hashes in the changelog.
r3557
test fixes for latest changes
r1895 response.mustcontain(
synced vcs with upstream...
r3797 """<span class="changeset_hash">r539:22baf968d547</span>"""
test fixes for latest changes
r1895 )
fixed tests
r1021
Implemented show_id function that is a configurable way to display sha hashes in the changelog.
r3557 def test_index_git(self):
self.log_user()
response = self.app.get(url(controller='changelog', action='index',
repo_name=GIT_REPO))
response.mustcontain('''id="chg_20" class="container tablerow1"''')
response.mustcontain(
"""<input class="changeset_range" """
"""id="95f9a91d775b0084b2368ae7779e44931c849c0e" """
"""name="95f9a91d775b0084b2368ae7779e44931c849c0e" """
"""type="checkbox" value="1" />"""
)
response.mustcontain(
"""<span class="changeset_hash">r613:95f9a91d775b</span>"""
)
response.mustcontain("""fixing stupid typo in context for mercurial""")
# response.mustcontain(
# """<div id="changed_total_5e204e7583b9c8e7b93a020bd036564b1e731dae" """
# """style="float:right;" class="changed_total tooltip" """
# """title="Affected number of files, click to show """
# """more details">3</div>"""
# )
def test_index_pagination_git(self):
self.log_user()
#pagination
self.app.get(url(controller='changelog', action='index',
repo_name=GIT_REPO), {'page': 1})
self.app.get(url(controller='changelog', action='index',
repo_name=GIT_REPO), {'page': 2})
self.app.get(url(controller='changelog', action='index',
repo_name=GIT_REPO), {'page': 3})
self.app.get(url(controller='changelog', action='index',
repo_name=GIT_REPO), {'page': 4})
self.app.get(url(controller='changelog', action='index',
repo_name=GIT_REPO), {'page': 5})
response = self.app.get(url(controller='changelog', action='index',
repo_name=GIT_REPO), {'page': 6})
# Test response after pagination...
response.mustcontain(
"""<input class="changeset_range" """
"""id="636ed213f2f11ef91071b9c24f2d5e6bd01a6ed5" """
"""name="636ed213f2f11ef91071b9c24f2d5e6bd01a6ed5" """
"""type="checkbox" value="1" />"""
)
response.mustcontain(
"""<span class="changeset_hash">r515:636ed213f2f1</span>"""
)
Use changelog controller for displaying history of files....
r3760
def test_index_hg_with_filenode(self):
self.log_user()
response = self.app.get(url(controller='changelog', action='index',
revision='tip', f_path='/vcs/exceptions.py',
repo_name=HG_REPO))
#history commits messages
response.mustcontain('Added exceptions module, this time for real')
response.mustcontain('Added not implemented hg backend test case')
response.mustcontain('Added BaseChangeset class')
# Test response...
def test_index_git_with_filenode(self):
self.log_user()
response = self.app.get(url(controller='changelog', action='index',
revision='tip', f_path='/vcs/exceptions.py',
repo_name=GIT_REPO))
#history commits messages
response.mustcontain('Added exceptions module, this time for real')
response.mustcontain('Added not implemented hg backend test case')
response.mustcontain('Added BaseChangeset class')
def test_index_hg_with_filenode_that_is_dirnode(self):
self.log_user()
response = self.app.get(url(controller='changelog', action='index',
revision='tip', f_path='/tests',
repo_name=HG_REPO))
self.assertEqual(response.status, '302 Found')
def test_index_git_with_filenode_that_is_dirnode(self):
self.log_user()
response = self.app.get(url(controller='changelog', action='index',
revision='tip', f_path='/tests',
repo_name=GIT_REPO))
self.assertEqual(response.status, '302 Found')
def test_index_hg_with_filenode_not_existing(self):
self.log_user()
response = self.app.get(url(controller='changelog', action='index',
revision='tip', f_path='/wrong_path',
repo_name=HG_REPO))
self.assertEqual(response.status, '302 Found')
def test_index_git_with_filenode_not_existing(self):
self.log_user()
response = self.app.get(url(controller='changelog', action='index',
revision='tip', f_path='/wrong_path',
repo_name=GIT_REPO))
self.assertEqual(response.status, '302 Found')