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

Class TestCheckAuth

source code

       object --+    
                |    
unittest.TestCase --+
                    |
                   TestCheckAuth

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_valid(self) source code
 
test_invalid(self) source code
 
test_replay(self)
Don't validate the same response twice.
source code
 
test_invalidatehandle(self) source code
 
test_invalidatehandleNo(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 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: unittest.TestCase.setUp
(inherited documentation)

test_replay(self)

source code 

Don't validate the same response twice.

From "Checking the Nonce":

   When using "check_authentication", the OP MUST ensure that an
   assertion has not yet been accepted with the same value for
   "openid.response_nonce".

In this implementation, the assoc_handle is only valid once. And nonces are a signed component of the message, so they can't be used with another handle without breaking the sig.