X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ricxappframe%2Frmr%2Frmr_mocks%2Frmr_mocks.py;fp=ricxappframe%2Frmr%2Frmr_mocks%2Frmr_mocks.py;h=99ac406235e75d6b41031ffe71843d2215cf9010;hb=61270901cda095afdd3ce147bf0dfd628c84cf99;hp=2c188d4e3258dfb071fbae5e5a1776f64572fe98;hpb=666e8319bd0e618576be79a14208d7eaf0de99f2;p=ric-plt%2Fxapp-frame-py.git diff --git a/ricxappframe/rmr/rmr_mocks/rmr_mocks.py b/ricxappframe/rmr/rmr_mocks/rmr_mocks.py index 2c188d4..99ac406 100644 --- a/ricxappframe/rmr/rmr_mocks/rmr_mocks.py +++ b/ricxappframe/rmr/rmr_mocks/rmr_mocks.py @@ -21,6 +21,7 @@ Provides mocks that are useful for end applications unit testing import json import uuid +from ricxappframe.rmr import rmr def rcv_mock_generator(msg_payload, msg_type, msg_state, jsonb, timeout=0): @@ -62,7 +63,7 @@ def send_mock_generator(msg_state): class _Sbuf_Contents: - """fake version of how pointers work (ctype pointer access is done by accessing a magical attrivute called "contents""" + """fake version of how pointers work (ctype pointer access is done by accessing a magical attribute called "contents""" def __init__(self): self.state = 0 @@ -77,14 +78,14 @@ class _Sbuf_Contents: def __str__(self): return str( { - "state": self.state, - "mtype": self.mtype, - "len": self.len, - "payload": self.payload, - "xaction": self.xaction, - "sub_id": self.sub_id, - "tp_state": self.tp_state, - "meid": self.meid, + rmr.RMR_MS_MSG_STATE: self.state, + rmr.RMR_MS_MSG_TYPE: self.mtype, + rmr.RMR_MS_PAYLOAD_LEN: self.len, + rmr.RMR_MS_PAYLOAD: self.payload, + rmr.RMR_MS_TRN_ID: self.xaction, + rmr.RMR_MS_SUB_ID: self.sub_id, + rmr.RMR_MS_ERRNO: self.tp_state, + rmr.RMR_MS_MEID: self.meid, } )