Files
@ d7488551578e
Branch filter:
Location: kallithea/rhodecode/tests/functional/test_changelog.py - annotation
d7488551578e
6.8 KiB
text/x-python
synced vcs with upstream
- moved subprocessio module to VCS
- many small changes to make embedded vcs as similar to to external lib
- use only absolute imports
- patch vcs config during load pylons env
- moved subprocessio module to VCS
- many small changes to make embedded vcs as similar to to external lib
- use only absolute imports
- patch vcs config during load pylons env
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | 1e757ac98988 1e757ac98988 b7adbd5456c2 1e757ac98988 1e757ac98988 8acbfa837180 1e757ac98988 88d13c1c6a55 88d13c1c6a55 8acbfa837180 7abbb77b02d0 b7adbd5456c2 623e1d68a2e0 d7488551578e d7488551578e 623e1d68a2e0 b7adbd5456c2 d7488551578e b7adbd5456c2 d7488551578e b7adbd5456c2 d7488551578e 8acbfa837180 58dcef7eef03 58dcef7eef03 80dc0a23edf7 58dcef7eef03 623e1d68a2e0 58dcef7eef03 623e1d68a2e0 58dcef7eef03 623e1d68a2e0 58dcef7eef03 623e1d68a2e0 58dcef7eef03 623e1d68a2e0 88d13c1c6a55 623e1d68a2e0 8acbfa837180 b7adbd5456c2 b7adbd5456c2 623e1d68a2e0 d7488551578e d7488551578e 623e1d68a2e0 b7adbd5456c2 58dcef7eef03 b7adbd5456c2 d7488551578e b7adbd5456c2 0ea8eca2d63e 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 58dcef7eef03 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e 6302a1423a4e | from rhodecode.tests import *
class TestChangelogController(TestController):
def test_index_hg(self):
self.log_user()
response = self.app.get(url(controller='changelog', action='index',
repo_name=HG_REPO))
response.mustcontain('''id="chg_20" class="container tablerow1"''')
response.mustcontain(
"""<input class="changeset_range" """
"""id="7b22a518347bb9bc19679f6af07cd0a61bfe16e7" """
"""name="7b22a518347bb9bc19679f6af07cd0a61bfe16e7" """
"""type="checkbox" value="1" />"""
)
#rev 640: code garden
response.mustcontain(
"""<span class="changeset_hash">r640:0a4e54a44604</span>"""
)
response.mustcontain("""code garden""")
def test_index_pagination_hg(self):
self.log_user()
#pagination
self.app.get(url(controller='changelog', action='index',
repo_name=HG_REPO), {'page': 1})
self.app.get(url(controller='changelog', action='index',
repo_name=HG_REPO), {'page': 2})
self.app.get(url(controller='changelog', action='index',
repo_name=HG_REPO), {'page': 3})
self.app.get(url(controller='changelog', action='index',
repo_name=HG_REPO), {'page': 4})
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})
# Test response after pagination...
response.mustcontain(
"""<input class="changeset_range" """
"""id="22baf968d547386b9516965ce89d189665003a31" """
"""name="22baf968d547386b9516965ce89d189665003a31" """
"""type="checkbox" value="1" />"""
)
response.mustcontain(
"""<span class="changeset_hash">r539:22baf968d547</span>"""
)
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>"""
)
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')
|