Beispiel #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)
Beispiel #2
0
 def test_create_listener(self):
     p = producer.ListenerProducer()
     p.create(self.mck_model)
     kw = {'listener_id': self.mck_model.id}
     self.mck_client.cast.assert_called_once_with({}, 'create_listener',
                                                  **kw)