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

Class TestSignatory

source code

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

Nested Classes [hide private]

Inherited from unittest.case.TestCase: failureException

Instance Methods [hide private]
 
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.case.TestCase: __call__, __eq__, __hash__, __init__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription, skipTest, tearDown

Inherited from unittest.case.TestCase (private): _addSkip, _baseAssertEqual, _deprecate, _formatMessage, _getAssertEqualityFunc, _truncateMessage

Inherited from CatchLogs: gotLogMessage

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

Class Methods [hide private]

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables [hide private]

Inherited from unittest.case.TestCase: longMessage, maxDiff

Inherited from unittest.case.TestCase (private): _classSetupFailed, _diffThreshold

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: 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.