Mercurial > kallithea
annotate rhodecode/tests/functional/test_admin_users_groups.py @ 1382:c310e1e1e757 beta
Added CheckSessionFlash into init.
Added repo_groups_test controller.
Renamed users_groups test controller
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 14 Jun 2011 09:38:23 +0200 |
parents | rhodecode/tests/functional/test_users_groups.py@83d35d716a02 |
children | 6dee43453f58 |
rev | line source |
---|---|
956
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 from rhodecode.tests import * |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 |
1382
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
3 TEST_USERS_GROUP = 'admins_test' |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
4 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
5 class TestAdminUsersGroupsController(TestController): |
956
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 def test_index(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 response = self.app.get(url('users_groups')) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 # Test response... |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 def test_index_as_xml(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 response = self.app.get(url('formatted_users_groups', format='xml')) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
13 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
14 def test_create(self): |
1382
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
15 users_group_name = TEST_USERS_GROUP |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
16 response = self.app.post(url('users_groups'), |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
17 {'users_group_name':users_group_name, |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
18 'active':True}) |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
19 response.follow() |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
20 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
21 self.checkSessionFlash(response, |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
22 'created users group %s' % TEST_USERS_GROUP) |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
23 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
24 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
25 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
26 |
956
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
28 def test_new(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
29 response = self.app.get(url('new_users_group')) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
30 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
31 def test_new_as_xml(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
32 response = self.app.get(url('formatted_new_users_group', format='xml')) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
33 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
34 def test_update(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 response = self.app.put(url('users_group', id=1)) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
37 def test_update_browser_fakeout(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
38 response = self.app.post(url('users_group', id=1), params=dict(_method='put')) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
39 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
40 def test_delete(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
41 response = self.app.delete(url('users_group', id=1)) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
42 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
43 def test_delete_browser_fakeout(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
44 response = self.app.post(url('users_group', id=1), params=dict(_method='delete')) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
45 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
46 def test_show(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
47 response = self.app.get(url('users_group', id=1)) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
48 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
49 def test_show_as_xml(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
50 response = self.app.get(url('formatted_users_group', id=1, format='xml')) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
51 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
52 def test_edit(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
53 response = self.app.get(url('edit_users_group', id=1)) |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
54 |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
55 def test_edit_as_xml(self): |
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
56 response = self.app.get(url('formatted_edit_users_group', id=1, format='xml')) |
1382
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
57 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
58 def test_assign_members(self): |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
59 pass |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
60 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
61 def test_add_create_permission(self): |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
62 pass |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
63 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
64 def test_revoke_members(self): |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
65 pass |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
66 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
67 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
68 |
c310e1e1e757
Added CheckSessionFlash into init.
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
69 |