X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tests%2Ftest_controller.py;h=2866dd8990e13b62563fb50a346d43c6c3333f01;hb=a0876efd819b43b870ba2254b34676b1a03ad326;hp=88d6f70c6d9ecdd0b447655682e35fd7c003651e;hpb=bfa46147cce23a46a49fb53dfae8a790b0fe34e4;p=ric-plt%2Fa1.git diff --git a/tests/test_controller.py b/tests/test_controller.py index 88d6f70..2866dd8 100644 --- a/tests/test_controller.py +++ b/tests/test_controller.py @@ -76,6 +76,13 @@ def _test_put_patch(monkeypatch): rmr_mocks.patch_rmr(monkeypatch) monkeypatch.setattr("rmr.rmr.rmr_send_msg", rmr_mocks.send_mock_generator(0)) # good sends for this whole batch + # we need this because free expects a real sbuf + # TODO: move this into rmr_mocks + def noop(_sbuf): + pass + + monkeypatch.setattr("rmr.rmr.rmr_free_msg", noop) + # we need to repatch alloc (already patched in patch_rmr) to fix the transactionid, alloc is called in send and recieve def fake_alloc(_unused, _alsounused): sbuf = rmr_mocks.Rmr_mbuf_t()