Exemple #1
0
 def test_update_l7policy(self):
     p = producer.L7PolicyProducer()
     l7policy_model = data_models.L7Policy(id=10)
     l7policy_updates = l7policy.L7PolicyPUT(enabled=False)
     p.update(l7policy_model, l7policy_updates)
     kw = {
         'l7policy_id': l7policy_model.id,
         'l7policy_updates': l7policy_updates.to_dict(render_unsets=False)
     }
     self.mck_client.cast.assert_called_once_with({}, 'update_l7policy',
                                                  **kw)
Exemple #2
0
 def test_delete_l7policy(self):
     p = producer.L7PolicyProducer()
     p.delete(self.mck_model)
     kw = {'l7policy_id': self.mck_model.id}
     self.mck_client.cast.assert_called_once_with({}, 'delete_l7policy',
                                                  **kw)