'test that the pool is created and has the right attributes'

def testPool(self):

    pool = cx_Oracle.SessionPool(USERNAME, PASSWORD, TNSENTRY, 2, 8, 3)
    self.failUnlessEqual(pool.username, USERNAME, 'user    name    differs')
    self.failUnlessEqual(pool.tnsentry, TNSENTRY, 'tnsentry    differs')
    self.failUnlessEqual(pool.max, 8, 'max    differs')
    self.failUnlessEqual(pool.min, 2, 'min    differs')
    self.failUnlessEqual(pool.increment, 3, 'increment    differs')
    self.failUnlessEqual(pool.opened, 2, 'opened    differs')
    self.failUnlessEqual(pool.busy, 0, 'busy    not    0    at    start')
    connection_1 = pool.acquire()
    self.failUnlessEqual(pool.busy, 1, 'busy    not    1    after    acquire')
    self.failUnlessEqual(pool.opened, 2, 'opened    not    unchanged    (1)')
    connection_2 = pool.acquire()
    self.failUnlessEqual(pool.busy, 2, 'busy    not    2    after    acquire')
    self.failUnlessEqual(pool.opened, 2, 'opened    not    unchanged    (2)')
    connection_3 = pool.acquire()
    self.failUnlessEqual(pool.busy, 3, 'busy    not    3    after    acquire')
    self.failUnlessEqual(pool.opened, 5, 'opened    not    changed    (3)')
    pool.release(connection_3)
    self.failUnlessEqual(pool.busy, 2, 'busy    not    2    after    release')
    del connection_2
    self.failUnlessEqual(pool.busy, 1, 'busy    not    1    after    del')
