Back to index

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

List of all members.

Public Member Functions

def setUp
def setUsername
def setSecret
def testIsHtmlInput
def testConsistent
def testDiffersPerUser
def testDiffersPerSecret
def tearDown

Public Attributes

 view
 sm
 manager

Detailed Description

Definition at line 15 of file testAuthenticator.py.


Member Function Documentation

Definition at line 26 of file testAuthenticator.py.

00026 
00027     def setSecret(self, secret):
00028         self.manager.keys[0]=secret
00029 

Here is the caller graph for this function:

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

Definition at line 16 of file testAuthenticator.py.

00016 
00017     def setUp(self):
00018         KeyringTestCase.setUp(self)
00019         self.view=AuthenticatorView(None, None)
00020 

Definition at line 21 of file testAuthenticator.py.

00021 
00022     def setUsername(self, name):
00023         user=getSecurityManager().getUser()
00024         user.name=name
00025 

Here is the call graph for this function:

Here is the caller graph for this function:

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 36 of file testAuthenticator.py.

00036 
00037     def testConsistent(self):
00038         one=self.view.authenticator()
00039         two=self.view.authenticator()
00040         self.assertEqual(one, two)
00041 

Definition at line 49 of file testAuthenticator.py.

00049 
00050     def testDiffersPerSecret(self):
00051         one=self.view.authenticator()
00052         self.setSecret("other")
00053         two=self.view.authenticator()
00054         self.assertNotEqual(one, two)
00055 
00056 

Here is the call graph for this function:

Definition at line 42 of file testAuthenticator.py.

00042 
00043     def testDiffersPerUser(self):
00044         one=self.view.authenticator()
00045         self.setUsername("other")
00046         two=self.view.authenticator()
00047         self.assertNotEqual(one, two)
00048 

Here is the call graph for this function:

Definition at line 30 of file testAuthenticator.py.

00030 
00031     def testIsHtmlInput(self):
00032         auth=self.view.authenticator()
00033         self.failUnless(auth.startswith("<input"))
00034         self.failUnless(auth.endswith("/>"))
00035 


Member Data Documentation

Definition at line 25 of file case.py.

Definition at line 24 of file case.py.

Definition at line 18 of file testAuthenticator.py.


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