Mercurial > kallithea
annotate rhodecode/tests/functional/test_shortlog.py @ 3089:4cc9bb83ecb4 beta
Fixed some issues with edit form
- unified code (but still a lot of duplicated code left over)
- fixed forms
- fixed validators
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 13 Dec 2012 03:34:19 +0100 |
parents | a520d542697e |
children | 6302a1423a4e |
rev | line source |
---|---|
547
1e757ac98988
renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
473
diff
changeset
|
1 from rhodecode.tests import * |
83
db39d0ca5308
implemented Shortlog as seperate controller,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff
changeset
|
2 |
3039
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
3 |
83
db39d0ca5308
implemented Shortlog as seperate controller,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff
changeset
|
4 class TestShortlogController(TestController): |
db39d0ca5308
implemented Shortlog as seperate controller,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff
changeset
|
5 |
3039
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
6 def test_index_hg(self): |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
7 self.log_user() |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
8 response = self.app.get(url(controller='shortlog', action='index', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
9 repo_name=HG_REPO)) |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
10 # Test response... |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
11 |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
12 def test_index_git(self): |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
13 self.log_user() |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
14 response = self.app.get(url(controller='shortlog', action='index', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
15 repo_name=GIT_REPO)) |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
16 # Test response... |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
17 |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
18 def test_index_hg_with_filenode(self): |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
19 self.log_user() |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
20 response = self.app.get(url(controller='shortlog', action='index', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
21 revision='tip', f_path='/vcs/exceptions.py', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
22 repo_name=HG_REPO)) |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
23 #history commits messages |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
24 response.mustcontain('Added exceptions module, this time for real') |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
25 response.mustcontain('Added not implemented hg backend test case') |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
26 response.mustcontain('Added BaseChangeset class') |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
27 # Test response... |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
28 |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
29 def test_index_git_with_filenode(self): |
473
6b934c9607e7
Improved testing scenarios. Made test env creator
Marcin Kuzminski <marcin@python-works.com>
parents:
459
diff
changeset
|
30 self.log_user() |
3039
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
31 response = self.app.get(url(controller='shortlog', action='index', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
32 revision='tip', f_path='/vcs/exceptions.py', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
33 repo_name=GIT_REPO)) |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
34 #history commits messages |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
35 response.mustcontain('Added exceptions module, this time for real') |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
36 response.mustcontain('Added not implemented hg backend test case') |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
37 response.mustcontain('Added BaseChangeset class') |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
38 |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
39 def test_index_hg_with_filenode_that_is_dirnode(self): |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
40 self.log_user() |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
41 response = self.app.get(url(controller='shortlog', action='index', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
42 revision='tip', f_path='/tests', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
43 repo_name=HG_REPO)) |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
44 self.assertEqual(response.status, '302 Found') |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
45 |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
46 def test_index_git_with_filenode_that_is_dirnode(self): |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
47 self.log_user() |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
48 response = self.app.get(url(controller='shortlog', action='index', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
49 revision='tip', f_path='/tests', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
50 repo_name=GIT_REPO)) |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
51 self.assertEqual(response.status, '302 Found') |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
52 |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
53 def test_index_hg_with_filenode_not_existing(self): |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
54 self.log_user() |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
55 response = self.app.get(url(controller='shortlog', action='index', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
56 revision='tip', f_path='/wrong_path', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
57 repo_name=HG_REPO)) |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
58 self.assertEqual(response.status, '302 Found') |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
59 |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
60 def test_index_git_with_filenode_not_existing(self): |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
61 self.log_user() |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
62 response = self.app.get(url(controller='shortlog', action='index', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
63 revision='tip', f_path='/wrong_path', |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
64 repo_name=GIT_REPO)) |
a520d542697e
Implemented file history page for showing detailed changelog for a given file
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
65 self.assertEqual(response.status, '302 Found') |