#NEWLINE# def testProxyAuth( self ) : #NEWLINE# #INDENT# 'test that proxy authentication is possible' #NEWLINE# pool = cx_Oracle . SessionPool ( USERNAME , PASSWORD , TNSENTRY , 2 , 8 , 3 ) #NEWLINE# self . failUnlessEqual ( self . homogeneous , 1 , 'homogeneous should be 1 by default' ) #NEWLINE# self . failUnlessRaises ( cx_Oracle . ProgrammingError , pool . acquire , user = 'proxyuser' ) #NEWLINE# pool = cx_Oracle . SessionPool ( USERNAME , PASSWORD , TNSENTRY , 2 , 8 , 3 , homogeneous = False ) #NEWLINE# self . failUnlessEqual ( pool . homogeneous , 0 , 'homogeneous should be 0 after setting it in the constructor' ) #NEWLINE# user = ( '%s_proxy' % USERNAME ) #NEWLINE# connection = pool . acquire ( user = user ) #NEWLINE# cursor = connection . cursor ( ) #NEWLINE# cursor . execute ( 'select user from dual' ) #NEWLINE# ( result , ) = cursor . fetchone ( ) #NEWLINE# self . assertEqual ( result , user . upper ( ) )