def test_pool_create(self): values = [] values.append({"name": "UnitTest"}) values.append({"pool_type": "unitpool"}) values.append({"url": "unittest.com"}) values.append({"user": "******"}) values.append({"priority": "priority"}) values.append({"password": "******"}) pool = Pool.create(values) self.assertTrue(pool.name == "UnitTest") self.assertTrue(pool.pool_type == "unitpool") self.assertTrue(pool.url == "unittest.com") self.assertTrue(pool.user == "test") self.assertTrue(pool.priority == "priority") self.assertTrue(pool.password == "secret")
def savepool(msg): #save the new named pool pool = Pool.create(msg.values) COMPONENTSAVE.app.pools.save_pool(pool) return pool