Exemple #1
0
 def test_update_listener(self):
     p = producer.ListenerProducer()
     listener_model = data_models.LoadBalancer(id=10)
     listener_updates = listener.ListenerPUT(enabled=False)
     p.update(listener_model, listener_updates)
     kw = {'listener_id': listener_model.id,
           'listener_updates': listener_updates.to_dict(
               render_unsets=False)}
     self.mck_client.cast.assert_called_once_with(
         {}, 'update_listener', **kw)
Exemple #2
0
 def test_delete_listener(self):
     p = producer.ListenerProducer()
     p.delete(self.mck_model)
     kw = {'listener_id': self.mck_model.id}
     self.mck_client.cast.assert_called_once_with(
         {}, 'delete_listener', **kw)