def test_deployment_update_several(self): # Create a deployment and update it deploy_one = db.deployment_create({}) self.assertEqual(deploy_one['config'], {}) update_deploy_one = db.deployment_update( deploy_one['uuid'], {'config': { 'opt1': 'val1' }}, ) self.assertEqual(update_deploy_one['uuid'], deploy_one['uuid']) self.assertEqual(update_deploy_one['config'], {'opt1': 'val1'}) get_deploy_one = db.deployment_get(deploy_one['uuid']) self.assertEqual(get_deploy_one['uuid'], deploy_one['uuid']) self.assertEqual(get_deploy_one['config'], {'opt1': 'val1'}) # Create another deployment deploy_two = db.deployment_create({}) update_deploy_two = db.deployment_update( deploy_two['uuid'], {'config': { 'opt2': 'val2' }}, ) self.assertEqual(update_deploy_two['uuid'], deploy_two['uuid']) self.assertEqual(update_deploy_two['config'], {'opt2': 'val2'}) get_deploy_one_again = db.deployment_get(deploy_one['uuid']) self.assertEqual(get_deploy_one_again['uuid'], deploy_one['uuid']) self.assertEqual(get_deploy_one_again['config'], {'opt1': 'val1'})
def test_deployment_update_several(self): # Create a deployment and update it deploy_one = db.deployment_create({}) self.assertEqual(deploy_one["config"], {}) update_deploy_one = db.deployment_update(deploy_one["uuid"], {"config": { "opt1": "val1" }}) self.assertEqual(update_deploy_one["uuid"], deploy_one["uuid"]) self.assertEqual(update_deploy_one["config"], {"opt1": "val1"}) get_deploy_one = db.deployment_get(deploy_one["uuid"]) self.assertEqual(get_deploy_one["uuid"], deploy_one["uuid"]) self.assertEqual(get_deploy_one["config"], {"opt1": "val1"}) # Create another deployment deploy_two = db.deployment_create({}) update_deploy_two = db.deployment_update(deploy_two["uuid"], {"config": { "opt2": "val2" }}) self.assertEqual(update_deploy_two["uuid"], deploy_two["uuid"]) self.assertEqual(update_deploy_two["config"], {"opt2": "val2"}) get_deploy_one_again = db.deployment_get(deploy_one["uuid"]) self.assertEqual(get_deploy_one_again["uuid"], deploy_one["uuid"]) self.assertEqual(get_deploy_one_again["config"], {"opt1": "val1"})
def test_deployment_update_several(self): # Create a deployment and update it deploy_one = db.deployment_create({}) self.assertEqual(deploy_one['config'], {}) update_deploy_one = db.deployment_update( deploy_one['uuid'], {'config': {'opt1': 'val1'}}, ) self.assertEqual(update_deploy_one['uuid'], deploy_one['uuid']) self.assertEqual(update_deploy_one['config'], {'opt1': 'val1'}) get_deploy_one = db.deployment_get(deploy_one['uuid']) self.assertEqual(get_deploy_one['uuid'], deploy_one['uuid']) self.assertEqual(get_deploy_one['config'], {'opt1': 'val1'}) # Create another deployment deploy_two = db.deployment_create({}) update_deploy_two = db.deployment_update( deploy_two['uuid'], {'config': {'opt2': 'val2'}}, ) self.assertEqual(update_deploy_two['uuid'], deploy_two['uuid']) self.assertEqual(update_deploy_two['config'], {'opt2': 'val2'}) get_deploy_one_again = db.deployment_get(deploy_one['uuid']) self.assertEqual(get_deploy_one_again['uuid'], deploy_one['uuid']) self.assertEqual(get_deploy_one_again['config'], {'opt1': 'val1'})
def test_deployment_update(self): deploy = db.deployment_create({}) self.assertEqual(deploy['config'], {}) update_deploy = db.deployment_update(deploy['uuid'], {'config': {'opt': 'val'}}) self.assertEqual(update_deploy['uuid'], deploy['uuid']) self.assertEqual(update_deploy['config'], {'opt': 'val'}) get_deploy = db.deployment_get(deploy['uuid']) self.assertEqual(get_deploy['uuid'], deploy['uuid']) self.assertEqual(get_deploy['config'], {'opt': 'val'})
def test_deployment_update(self): deploy = db.deployment_create({}) self.assertEqual(deploy["config"], {}) update_deploy = db.deployment_update(deploy["uuid"], {"config": {"opt": "val"}}) self.assertEqual(update_deploy["uuid"], deploy["uuid"]) self.assertEqual(update_deploy["config"], {"opt": "val"}) get_deploy = db.deployment_get(deploy["uuid"]) self.assertEqual(get_deploy["uuid"], deploy["uuid"]) self.assertEqual(get_deploy["config"], {"opt": "val"})
def test_deployment_update_several(self): # Create a deployment and update it deploy_one = db.deployment_create({}) self.assertEqual(deploy_one["config"], {}) update_deploy_one = db.deployment_update( deploy_one["uuid"], {"config": {"opt1": "val1"}}) self.assertEqual(update_deploy_one["uuid"], deploy_one["uuid"]) self.assertEqual(update_deploy_one["config"], {"opt1": "val1"}) get_deploy_one = db.deployment_get(deploy_one["uuid"]) self.assertEqual(get_deploy_one["uuid"], deploy_one["uuid"]) self.assertEqual(get_deploy_one["config"], {"opt1": "val1"}) # Create another deployment deploy_two = db.deployment_create({}) update_deploy_two = db.deployment_update( deploy_two["uuid"], {"config": {"opt2": "val2"}}) self.assertEqual(update_deploy_two["uuid"], deploy_two["uuid"]) self.assertEqual(update_deploy_two["config"], {"opt2": "val2"}) get_deploy_one_again = db.deployment_get(deploy_one["uuid"]) self.assertEqual(get_deploy_one_again["uuid"], deploy_one["uuid"]) self.assertEqual(get_deploy_one_again["config"], {"opt1": "val1"})
def test_deployment_update(self): deploy = db.deployment_create({}) self.assertEqual(deploy["config"], {}) update_deploy = db.deployment_update(deploy["uuid"], {"config": { "opt": "val" }}) self.assertEqual(update_deploy["uuid"], deploy["uuid"]) self.assertEqual(update_deploy["config"], {"opt": "val"}) get_deploy = db.deployment_get(deploy["uuid"]) self.assertEqual(get_deploy["uuid"], deploy["uuid"]) self.assertEqual(get_deploy["config"], {"opt": "val"})
def _update(self, values): self.deployment = db.deployment_update(self.deployment['uuid'], values)
def _update(self, values): self.deployment = db.deployment_update(self.deployment["uuid"], values)