#NEWLINE# def test_saml_login_post( self ) : #NEWLINE# #INDENT# MockedSettings [ 'login_strategy' ] = 'saml' #NEWLINE# with nested ( mock . patch . object ( logging , 'exception' ) , mock . patch . dict ( Settings , MockedSettings ) ) : #NEWLINE# #INDENT# with mock . patch ( 'pushmanager.handlers.LoginHandler._saml_login' ) as mock_saml_login : #NEWLINE# #INDENT# request = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . fetch ( '/login' , method = 'POST' , body = urllib . urlencode ( request ) ) #NEWLINE# mock_saml_login . assert_called ( )