Mercurial > public > src > rhodecode
annotate pylons_app/tests/functional/test_admin_settings.py @ 501:7c978511c951
implemented basic (startup) nose test suite.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 05 Sep 2010 16:20:29 +0200 |
parents | 51362853ac3b |
children | fefffd6fd5f4 |
rev | line source |
---|---|
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 from pylons_app.tests import * |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 class TestSettingsController(TestController): |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 def test_index(self): |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 response = self.app.get(url('admin_settings')) |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 # Test response... |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 def test_index_as_xml(self): |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 response = self.app.get(url('formatted_admin_settings', format='xml')) |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 def test_create(self): |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
13 response = self.app.post(url('admin_settings')) |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
14 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 def test_new(self): |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
16 response = self.app.get(url('admin_new_setting')) |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 def test_new_as_xml(self): |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 response = self.app.get(url('formatted_admin_new_setting', format='xml')) |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 def test_update(self): |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
22 response = self.app.put(url('admin_setting', setting_id=1)) |
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
24 def test_update_browser_fakeout(self): |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
25 response = self.app.post(url('admin_setting', setting_id=1), params=dict(_method='put')) |
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 def test_delete(self): |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
28 response = self.app.delete(url('admin_setting', setting_id=1)) |
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
29 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
30 def test_delete_browser_fakeout(self): |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
31 response = self.app.post(url('admin_setting', setting_id=1), params=dict(_method='delete')) |
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
32 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
33 def test_show(self): |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
34 response = self.app.get(url('admin_setting', setting_id=1)) |
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 def test_show_as_xml(self): |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
37 response = self.app.get(url('formatted_admin_setting', setting_id=1, format='xml')) |
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
38 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
39 def test_edit(self): |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
40 response = self.app.get(url('admin_edit_setting', setting_id=1)) |
369
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
41 |
51362853ac3b
added settings rest controllers for admin, updated routes with easier submodule handling
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
42 def test_edit_as_xml(self): |
501
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
369
diff
changeset
|
43 response = self.app.get(url('formatted_admin_edit_setting', setting_id=1, format='xml')) |