Package expedient :: Package common :: Package permissions :: Package tests :: Module tests :: Class TestRequests
[hide private]
[frames] | no frames]

Class TestRequests

source code


Nested Classes [hide private]

Inherited from unittest.TestCase: failureException

Instance Methods [hide private]
 
setUp(self)
Hook method for setting up the test fixture before exercising it.
source code
 
test_allowed_request(self)
Tests that an allowed get works for a protected view.
source code
 
test_disallowed_request_no_redirect(self)
Tests that a permission with no view defined just raises an error.
source code
 
test_disallowed_redirect(self)
Tests that the "can_add" permission is applied correctly for the PermissionTestClass and that we are redirected to obtain the permission
source code
 
test_get_permission(self)
Get the permission to create then create.
source code
 
test_protected_post(self)
Try to post to a view protected by an object permission.
source code
 
test_protected_url(self)
Try to access a protected url.
source code
 
test_request_permission(self)
Test the generic request_permission view for permissions.
source code

Inherited from tests.manager.SettingsTestCase: __init__, tearDown

Inherited from django.test.testcases.TestCase (private): _fixture_setup, _fixture_teardown

Inherited from django.test.testcases.TransactionTestCase: __call__, assertContains, assertFormError, assertNotContains, assertQuerysetEqual, assertRedirects, assertTemplateNotUsed, assertTemplateUsed, restore_warnings_state, save_warnings_state

Inherited from django.test.testcases.TransactionTestCase (private): _post_teardown, _pre_setup, _urlconf_setup, _urlconf_teardown

Inherited from unittest.TestCase: __eq__, __hash__, __ne__, __repr__, __str__, assertAlmostEqual, assertAlmostEquals, assertEqual, assertEquals, assertFalse, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertRaises, assertTrue, assert_, countTestCases, debug, defaultTestResult, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription

Inherited from unittest.TestCase (private): _exc_info

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  urls = 'expedient.common.permissions.tests.test_urls'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setUp(self)

source code 

Hook method for setting up the test fixture before exercising it.

Overrides: unittest.TestCase.setUp
(inherited documentation)

test_protected_post(self)

source code 

Try to post to a view protected by an object permission. Should redirect to get permission. Get permission, then try to post again.