annotate rhodecode/tests/functional/test_changelog.py @ 2466:7010dc12f10c codereview

Added rewritten validators module + tests
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 17 Jun 2012 21:31:31 +0200
parents c59cc8231f3c
children 82a88013a3fd 623e1d68a2e0
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
1895
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
3
93
aec4c0071cb3 added empty controllers for branches tags files graph, routing and test for them
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 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
5
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
6 def test_index_hg(self):
473
6b934c9607e7 Improved testing scenarios. Made test env creator
Marcin Kuzminski <marcin@python-works.com>
parents: 459
diff changeset
7 self.log_user()
1436
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
8 response = self.app.get(url(controller='changelog', action='index',
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
9 repo_name=HG_REPO))
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
10
1895
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
11 response.mustcontain("""<div id="chg_20" class="container tablerow1">""")
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
12 response.mustcontain(
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
13 """<input class="changeset_range" id="5e204e7583b9" """
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
14 """name="5e204e7583b9" type="checkbox" value="1" />"""
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
15 )
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
16 response.mustcontain(
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
17 """<span class="changeset_id">154:"""
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
18 """<span class="changeset_hash">5e204e7583b9</span></span>"""
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
19 )
1707
54fda6ce9e98 fixes timezone issues with tests
Marcin Kuzminski <marcin@python-works.com>
parents: 1548
diff changeset
20
1895
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
21 response.mustcontain("""Small update at simplevcs app""")
1436
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
22
1895
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
23 response.mustcontain(
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
24 """<div id="5e204e7583b9c8e7b93a020bd036564b1e731dae" """
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
25 """style="float:right;" class="changed_total tooltip" """
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
26 """title="Affected number of files, click to show """
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
27 """more details">3</div>"""
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
28 )
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
29
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
30 #pagination
1436
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
31 response = self.app.get(url(controller='changelog', action='index',
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
32 repo_name=HG_REPO), {'page':1})
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
33 response = self.app.get(url(controller='changelog', action='index',
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
34 repo_name=HG_REPO), {'page':2})
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
35 response = self.app.get(url(controller='changelog', action='index',
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
36 repo_name=HG_REPO), {'page':3})
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
37 response = self.app.get(url(controller='changelog', action='index',
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
38 repo_name=HG_REPO), {'page':4})
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
39 response = self.app.get(url(controller='changelog', action='index',
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
40 repo_name=HG_REPO), {'page':5})
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
41 response = self.app.get(url(controller='changelog', action='index',
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
42 repo_name=HG_REPO), {'page':6})
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
43
1895
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
44 # Test response after pagination...
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
45 response.mustcontain(
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
46 """<input class="changeset_range" id="46ad32a4f974" """
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
47 """name="46ad32a4f974" type="checkbox" value="1" />"""
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
48 )
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
49 response.mustcontain(
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
50 """<span class="changeset_id">64:"""
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
51 """<span class="changeset_hash">46ad32a4f974</span></span>"""
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
52 )
1021
0ea8eca2d63e fixed tests
Marcin Kuzminski <marcin@python-works.com>
parents: 904
diff changeset
53
1895
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
54 response.mustcontain(
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
55 """<div id="46ad32a4f974e45472a898c6b0acb600320579b1" """
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
56 """style="float:right;" class="changed_total tooltip" """
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
57 """title="Affected number of files, click to show """
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
58 """more details">21</div>"""
b7adbd5456c2 test fixes for latest changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1707
diff changeset
59 )
1436
88d13c1c6a55 removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents: 1021
diff changeset
60
1942
c59cc8231f3c fixed changelog test
Marcin Kuzminski <marcin@python-works.com>
parents: 1895
diff changeset
61 response.mustcontain(
c59cc8231f3c fixed changelog test
Marcin Kuzminski <marcin@python-works.com>
parents: 1895
diff changeset
62 """<a href="/%s/changeset/"""
c59cc8231f3c fixed changelog test
Marcin Kuzminski <marcin@python-works.com>
parents: 1895
diff changeset
63 """46ad32a4f974e45472a898c6b0acb600320579b1" """
c59cc8231f3c fixed changelog test
Marcin Kuzminski <marcin@python-works.com>
parents: 1895
diff changeset
64 """title="Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4">"""
c59cc8231f3c fixed changelog test
Marcin Kuzminski <marcin@python-works.com>
parents: 1895
diff changeset
65 """46ad32a4f974</a>""" % HG_REPO
c59cc8231f3c fixed changelog test
Marcin Kuzminski <marcin@python-works.com>
parents: 1895
diff changeset
66 )