#NEWLINE# def testEmptySessionType( self ) : #NEWLINE# #INDENT# msg = Message ( self . endpoint . preferredNamespace ( ) ) #NEWLINE# msg . setArg ( OPENID_NS , 'error' , 'Unsupported type' ) #NEWLINE# msg . setArg ( OPENID_NS , 'error_code' , 'unsupported-type' ) #NEWLINE# msg . setArg ( OPENID_NS , 'assoc_type' , 'new-assoc-type' ) #NEWLINE# self . consumer . return_messages = [ msg ] #NEWLINE# self . assertEqual ( self . consumer . _negotiateAssociation ( msg . endpoint ) , None ) #NEWLINE# self . failUnlessLogMatches ( 'Server error when requesting an association' )