def test_delete_healthmonitor(self): p = producer.HealthMonitorProducer() p.delete(self.mck_model) kw = {'health_monitor_id': self.mck_model.id} self.mck_client.cast.assert_called_once_with({}, 'delete_health_monitor', **kw)
def test_update_healthmonitor(self): p = producer.HealthMonitorProducer() hm = data_models.HealthMonitor(pool_id=10) hm_updates = health_monitor.HealthMonitorPUT(enabled=False) p.update(hm, hm_updates) kw = { 'pool_id': hm.pool_id, 'health_monitor_updates': hm_updates.to_dict(render_unsets=False) } self.mck_client.cast.assert_called_once_with({}, 'update_health_monitor', **kw)