Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.protect.tests.testAuthenticator.DecoratorTests Class Reference
Inheritance diagram for plone.protect.tests.testAuthenticator.DecoratorTests:
Inheritance graph
[legend]
Collaboration diagram for plone.protect.tests.testAuthenticator.DecoratorTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def testNoRequestParameter
def testIgnoreBadRequestType
def testBadAuthenticator
def tearDown

Public Attributes

 request
 func
 sm
 manager

Detailed Description

Definition at line 97 of file testAuthenticator.py.


Member Function Documentation

Reimplemented from plone.protect.tests.case.KeyringTestCase.

Definition at line 98 of file testAuthenticator.py.

00098 
00099     def setUp(self):
00100         self.request=HTTPRequest(sys.stdin, dict(SERVER_URL="dummy"), None)
00101         KeyringTestCase.setUp(self)
00102         def func(REQUEST=None):
00103             return 1
00104         self.func=AuthenticateForm(func)
00105 

Definition at line 31 of file case.py.

00031 
00032     def tearDown(self):
00033         self.sm.unregisterUtility(self.manager, provided=IKeyManager)
00034         noSecurityManager()
00035 

Definition at line 116 of file testAuthenticator.py.

00116 
00117     def testBadAuthenticator(self):
00118         self.request["_authenticator"]="incorrect"
00119         self.assertRaises(Forbidden, self.func, self.request)
00120 

Definition at line 112 of file testAuthenticator.py.

00112 
00113     def testIgnoreBadRequestType(self):
00114         self.assertEqual(self.func(), 1)
00115 

Definition at line 106 of file testAuthenticator.py.

00106 
00107     def testNoRequestParameter(self):
00108         def func():
00109             pass
00110         self.assertRaises(ValueError, AuthenticateForm, func)
00111 


Member Data Documentation

Definition at line 103 of file testAuthenticator.py.

Definition at line 25 of file case.py.

Definition at line 99 of file testAuthenticator.py.

Definition at line 24 of file case.py.


The documentation for this class was generated from the following file: