def test_delete_loadbalancer(self): p = producer.LoadBalancerProducer() p.delete(self.mck_model) kw = {'load_balancer_id': self.mck_model.id} self.mck_client.cast.assert_called_once_with({}, 'delete_load_balancer', **kw)
def test_update_loadbalancer(self): p = producer.LoadBalancerProducer() lb = data_models.LoadBalancer(id=10) lb_updates = load_balancer.LoadBalancerPUT(enabled=False) p.update(lb, lb_updates) kw = { 'load_balancer_id': lb.id, 'load_balancer_updates': lb_updates.to_dict(render_unsets=False) } self.mck_client.cast.assert_called_once_with({}, 'update_load_balancer', **kw)