Package openid :: Package test :: Module test_server :: Class TestSignatory
[frames] | no frames]

Class TestSignatory

source code

       object --+    
                |    
unittest.TestCase --+
                    |
       object --+   |
                |   |
        CatchLogs --+
                    |
                   TestSignatory

Nested Classes

Inherited from unittest.TestCase: failureException

Instance Methods
 
setUp(self)
Hook method for setting up the test fixture before exercising it.
source code
 
test_sign(self) source code
 
test_signDumb(self) source code
 
test_signExpired(self)
Sign a response to a message with an expired handle (using invalidate_handle).
source code
 
test_signInvalidHandle(self) source code
 
test_verify(self) source code
 
test_verifyBadSig(self) source code
 
test_verifyBadHandle(self) source code
 
test_verifyAssocMismatch(self)
Attempt to validate sign-all message with a signed-list assoc.
source code
 
test_getAssoc(self) source code
 
test_getAssocExpired(self) source code
 
test_getAssocInvalid(self) source code
 
test_getAssocDumbVsNormal(self)
getAssociation(dumb=False) cannot get a dumb assoc
source code
 
test_getAssocNormalVsDumb(self)
getAssociation(dumb=True) cannot get a shared assoc
source code
 
test_createAssociation(self) source code
 
makeAssoc(self, dumb, lifetime=60) source code
 
test_invalidate(self) source code

Inherited from unittest.TestCase: __call__, __init__, __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, tearDown

Inherited from CatchLogs: gotLogMessage

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties

Inherited from object: __class__

Method Details

setUp(self)

source code 

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

Overrides: CatchLogs.setUp

test_signExpired(self)

source code 

Sign a response to a message with an expired handle (using invalidate_handle).

From "Verifying with an Association":

   If an authentication request included an association handle for an
   association between the OP and the Relying party, and the OP no
   longer wishes to use that handle (because it has expired or the
   secret has been compromised, for instance), the OP will send a
   response that must be verified directly with the OP, as specified
   in Section 11.3.2. In that instance, the OP will include the field
   "openid.invalidate_handle" set to the association handle that the
   Relying Party included with the original request.

test_getAssocNormalVsDumb(self)

source code 

getAssociation(dumb=True) cannot get a shared assoc

From "Verifying Directly with the OpenID Provider":

   An OP MUST NOT verify signatures for associations that have shared
   MAC keys.