Module Import alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num If Call NameLoad NameLoad NameLoad body Raise Call AttributeLoad NameLoad attr NameLoad orelse Return NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str BinOpAdd Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str BinOpAdd Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Num Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Num Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Num Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Num Str Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad TupleLoad Str Str TupleLoad Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr CompareIs Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr CompareIn TupleLoad NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A unittest support CatchLogs openid.message Message OPENID2_NS OPENID1_NS OPENID_NS openid association openid.consumer.consumer GenericConsumer ServerError openid.consumer.discover OpenIDServiceEndpoint OPENID_2_0_TYPE ErrorRaisingConsumer N/A GenericConsumer N/A N/A 
    A consumer whose _requestAssocation will return predefined results
    instead of trying to actually perform association requests.
     N/A return_messages N/A _requestAssociation N/A N/A self endpoint assoc_type session_type N/A N/A N/A m N/A N/A N/A self return_messages pop 0 N/A N/A isinstance m Message N/A N/A N/A N/A ServerError fromMessage m N/A N/A m N/A N/A TestOpenID2SessionNegotiation N/A N/A unittest TestCase CatchLogs N/A N/A 
    Test the session type negotiation behavior of an OpenID 2
    consumer.
     setUp N/A N/A self N/A N/A N/A N/A N/A CatchLogs setUp self N/A N/A self consumer N/A ErrorRaisingConsumer store None N/A N/A self endpoint N/A OpenIDServiceEndpoint N/A N/A N/A self endpoint type_uris N/A OPENID_2_0_TYPE N/A N/A N/A self endpoint server_url bogus N/A testBadResponse N/A N/A self N/A N/A N/A 
        Test the case where the response to an associate request is a
        server error or is otherwise undecipherable.
         N/A N/A N/A self consumer return_messages N/A N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A self assertEqual N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint None N/A N/A N/A self failUnlessLogMatches Server error when requesting an association N/A testEmptyAssocType N/A N/A self N/A N/A N/A 
        Test the case where the association type (assoc_type) returned
        in an unsupported-type response is absent.
         N/A msg N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A msg setArg OPENID_NS error Unsupported type N/A N/A N/A msg setArg OPENID_NS error_code unsupported-type N/A N/A N/A msg setArg OPENID_NS session_type new-session-type N/A N/A N/A self consumer return_messages N/A msg N/A N/A N/A self assertEqual N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint None N/A N/A N/A self failUnlessLogMatches Unsupported association type N/A Server responded with unsupported association  session but did not supply a fallback. N/A testEmptySessionType N/A N/A self N/A N/A N/A 
        Test the case where the session type (session_type) returned
        in an unsupported-type response is absent.
         N/A msg N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A msg setArg OPENID_NS error Unsupported type N/A N/A N/A msg setArg OPENID_NS error_code unsupported-type N/A N/A N/A msg setArg OPENID_NS assoc_type new-assoc-type N/A N/A N/A self consumer return_messages N/A msg N/A N/A N/A self assertEqual N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint None N/A N/A N/A self failUnlessLogMatches Unsupported association type N/A Server responded with unsupported association  session but did not supply a fallback. N/A testNotAllowed N/A N/A self N/A N/A N/A 
        Test the case where an unsupported-type response specifies a
        preferred (assoc_type, session_type) combination that is not
        allowed by the consumer's SessionNegotiator.
         N/A allowed_types N/A N/A negotiator N/A N/A association SessionNegotiator allowed_types N/A N/A N/A self consumer negotiator negotiator N/A msg N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A msg setArg OPENID_NS error Unsupported type N/A N/A N/A msg setArg OPENID_NS error_code unsupported-type N/A N/A N/A msg setArg OPENID_NS assoc_type not-allowed N/A N/A N/A msg setArg OPENID_NS session_type not-allowed N/A N/A N/A self consumer return_messages N/A msg N/A N/A N/A self assertEqual N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint None N/A N/A N/A self failUnlessLogMatches Unsupported association type Server sent unsupported session/association type: N/A testUnsupportedWithRetry N/A N/A self N/A N/A N/A 
        Test the case where an unsupported-type response triggers a
        retry to get an association with the new preferred type.
         N/A msg N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A msg setArg OPENID_NS error Unsupported type N/A N/A N/A msg setArg OPENID_NS error_code unsupported-type N/A N/A N/A msg setArg OPENID_NS assoc_type HMAC-SHA1 N/A N/A N/A msg setArg OPENID_NS session_type DH-SHA1 N/A assoc N/A N/A association Association handle secret issued 10000 HMAC-SHA1 N/A N/A N/A self consumer return_messages N/A msg assoc N/A N/A N/A self failUnless N/A N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint assoc N/A N/A N/A self failUnlessLogMatches Unsupported association type N/A testUnsupportedWithRetryAndFail N/A N/A self N/A N/A N/A 
        Test the case where an unsupported-typ response triggers a
        retry, but the retry fails and None is returned instead.
         N/A msg N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A msg setArg OPENID_NS error Unsupported type N/A N/A N/A msg setArg OPENID_NS error_code unsupported-type N/A N/A N/A msg setArg OPENID_NS assoc_type HMAC-SHA1 N/A N/A N/A msg setArg OPENID_NS session_type DH-SHA1 N/A N/A N/A self consumer return_messages N/A msg N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A self failUnlessEqual N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint None N/A N/A N/A self failUnlessLogMatches Unsupported association type N/A Server %s refused N/A N/A self endpoint server_url N/A testValid N/A N/A self N/A N/A N/A 
        Test the valid case, wherein an association is returned on the
        first attempt to get one.
         N/A assoc N/A N/A association Association handle secret issued 10000 HMAC-SHA1 N/A N/A N/A self consumer return_messages N/A assoc N/A N/A N/A self failUnless N/A N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint assoc N/A N/A N/A self failUnlessLogEmpty N/A N/A TestOpenID1SessionNegotiation N/A N/A unittest TestCase CatchLogs N/A N/A 
    Tests for the OpenID 1 consumer association session behavior.  See
    the docs for TestOpenID2SessionNegotiation.  Notice that this
    class is not a subclass of the OpenID 2 tests.  Instead, it uses
    many of the same inputs but inspects the log messages logged with
    oidutil.log.  See the calls to self.failUnlessLogMatches.  Some of
    these tests pass openid2-style messages to the openid 1
    association processing logic to be sure it ignores the extra data.
     setUp N/A N/A self N/A N/A N/A N/A N/A CatchLogs setUp self N/A N/A self consumer N/A ErrorRaisingConsumer store None N/A N/A self endpoint N/A OpenIDServiceEndpoint N/A N/A N/A self endpoint type_uris N/A OPENID1_NS N/A N/A N/A self endpoint server_url bogus N/A testBadResponse N/A N/A self N/A N/A N/A N/A N/A self consumer return_messages N/A N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A self assertEqual N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint None N/A N/A N/A self failUnlessLogMatches Server error when requesting an association N/A testEmptyAssocType N/A N/A self N/A N/A N/A msg N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A msg setArg OPENID_NS error Unsupported type N/A N/A N/A msg setArg OPENID_NS error_code unsupported-type N/A N/A N/A msg setArg OPENID_NS session_type new-session-type N/A N/A N/A self consumer return_messages N/A msg N/A N/A N/A self assertEqual N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint None N/A N/A N/A self failUnlessLogMatches Server error when requesting an association N/A testEmptySessionType N/A N/A self N/A N/A N/A msg N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A msg setArg OPENID_NS error Unsupported type N/A N/A N/A msg setArg OPENID_NS error_code unsupported-type N/A N/A N/A msg setArg OPENID_NS assoc_type new-assoc-type N/A N/A N/A self consumer return_messages N/A msg N/A N/A N/A self assertEqual N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint None N/A N/A N/A self failUnlessLogMatches Server error when requesting an association N/A testNotAllowed N/A N/A self N/A N/A N/A allowed_types N/A N/A negotiator N/A N/A association SessionNegotiator allowed_types N/A N/A N/A self consumer negotiator negotiator N/A msg N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A msg setArg OPENID_NS error Unsupported type N/A N/A N/A msg setArg OPENID_NS error_code unsupported-type N/A N/A N/A msg setArg OPENID_NS assoc_type not-allowed N/A N/A N/A msg setArg OPENID_NS session_type not-allowed N/A N/A N/A self consumer return_messages N/A msg N/A N/A N/A self assertEqual N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint None N/A N/A N/A self failUnlessLogMatches Server error when requesting an association N/A testUnsupportedWithRetry N/A N/A self N/A N/A N/A msg N/A Message N/A N/A N/A self endpoint preferredNamespace N/A N/A N/A msg setArg OPENID_NS error Unsupported type N/A N/A N/A msg setArg OPENID_NS error_code unsupported-type N/A N/A N/A msg setArg OPENID_NS assoc_type HMAC-SHA1 N/A N/A N/A msg setArg OPENID_NS session_type DH-SHA1 N/A assoc N/A N/A association Association handle secret issued 10000 HMAC-SHA1 N/A N/A N/A self consumer return_messages N/A msg assoc N/A N/A N/A self failUnless N/A N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint None N/A N/A N/A self failUnlessLogMatches Server error when requesting an association N/A testValid N/A N/A self N/A N/A N/A assoc N/A N/A association Association handle secret issued 10000 HMAC-SHA1 N/A N/A N/A self consumer return_messages N/A assoc N/A N/A N/A self failUnless N/A N/A N/A N/A self consumer _negotiateAssociation N/A self endpoint assoc N/A N/A N/A self failUnlessLogEmpty N/A N/A TestNegotiatorBehaviors N/A N/A unittest TestCase CatchLogs N/A setUp N/A N/A self N/A N/A N/A N/A self allowed_types N/A N/A HMAC-SHA1 no-encryption N/A HMAC-SHA256 no-encryption N/A N/A self n N/A N/A association SessionNegotiator N/A self allowed_types N/A testAddAllowedTypeNoSessionTypes N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError N/A N/A self n addAllowedType invalid N/A testAddAllowedTypeBadSessionType N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError N/A N/A self n addAllowedType assoc1 invalid N/A testAddAllowedTypeContents N/A N/A self N/A N/A N/A assoc_type HMAC-SHA1 N/A N/A N/A self failUnless N/A N/A N/A N/A self n addAllowedType assoc_type None N/A typ N/A N/A association getSessionTypes assoc_type N/A N/A N/A N/A self failUnless N/A N/A assoc_type typ N/A N/A self n allowed_types N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main