def test_exists(self): """pool become available after it created.""" self.pool = ObjectPool(self.klass, min_init=1, expires=0) exists = ObjectPool.pool_exists(self.klass) self.assertTrue(exists)
def test_not_exist(self): """pool will not be available if that is not created for a class""" self.skip_teardown = True exists = ObjectPool.pool_exists(Browser) self.assertFalse(exists)
def test_destroy(self): """after destroy, pool should not be available or exist.""" self.pool = ObjectPool(self.klass, min_init=1, expires=0) self.pool.destroy() self.assertFalse(ObjectPool.pool_exists(self.klass))