def test_update_l7rule(self): p = producer.L7RuleProducer() l7rule_model = data_models.L7Rule(id=10) l7rule_updates = l7rule.L7RulePUT(enabled=False) p.update(l7rule_model, l7rule_updates) kw = {'l7rule_id': l7rule_model.id, 'l7rule_updates': l7rule_updates.to_dict(render_unsets=False)} self.mck_client.cast.assert_called_once_with( {}, 'update_l7rule', **kw)
def test_delete_l7rule(self): p = producer.L7RuleProducer() p.delete(self.mck_model) kw = {'l7rule_id': self.mck_model.id} self.mck_client.cast.assert_called_once_with( {}, 'delete_l7rule', **kw)