'test that proxy authentication is possible'

def testProxyAuth(self):

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