Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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))