fix messgae unit tests
This commit is contained in:
@@ -318,6 +318,8 @@ class Message(metaclass=IterRegistry):
|
||||
self.header_len)
|
||||
logger.debug(f'tsun-time: {result[0]:08x}'
|
||||
f' proxy-time: {ts:08x}')
|
||||
elif not self.ctrl.is_ind():
|
||||
self.inc_counter('Unknown_Ctrl')
|
||||
else:
|
||||
if self.ctrl.is_ind():
|
||||
ts = self.__timestamp()
|
||||
|
||||
@@ -342,8 +342,8 @@ def test_msg_get_time(ConfigTsunInv1, MsgGetTime):
|
||||
assert m.db.stat['proxy']['Unknown_Ctrl'] == 0
|
||||
m.close()
|
||||
|
||||
def test_msg_time_resp(ConfigTsunInv1, MsgTimeResp):
|
||||
ConfigTsunInv1
|
||||
def test_msg_time_resp(ConfigNoTsunInv1, MsgTimeResp):
|
||||
ConfigNoTsunInv1
|
||||
m = MemoryStream(MsgTimeResp, (0,), False)
|
||||
m.db.stat['proxy']['Unknown_Ctrl'] = 0
|
||||
m.read() # read complete msg, and dispatch msg
|
||||
|
||||
Reference in New Issue
Block a user