trx_toolkit/data_msg.py: do not instantiate abstract class DATAMSG

Change-Id: I811f67ae030ccd93e1c6a421097cec36ca01cbf9
Related: OS#4006, SYS#4895
This commit is contained in:
Vadim Yanitskiy 2021-02-28 19:20:45 +01:00 committed by fixeria
parent 5c3c28cc1d
commit 904d128c4d
1 changed files with 5 additions and 5 deletions

View File

@ -62,23 +62,23 @@ class DATAMSG_Test(unittest.TestCase):
def test_validate(self):
# Unknown version
with self.assertRaises(ValueError):
msg = DATAMSG(fn = 0, tn = 0, ver = 100)
msg = DATAMSG_TRX2L1(fn = 0, tn = 0, ver = 100)
msg.validate()
# Uninitialized field
with self.assertRaises(ValueError):
msg = DATAMSG()
msg = DATAMSG_TRX2L1()
msg.validate()
with self.assertRaises(ValueError):
msg = DATAMSG(fn = None, tn = 0)
msg = DATAMSG_TRX2L1(fn = None, tn = 0)
msg.validate()
# Out-of-range value(s)
with self.assertRaises(ValueError):
msg = DATAMSG(fn = -1, tn = 0)
msg = DATAMSG_TRX2L1(fn = -1, tn = 0)
msg.validate()
with self.assertRaises(ValueError):
msg = DATAMSG(fn = 0, tn = 10)
msg = DATAMSG_TRX2L1(fn = 0, tn = 10)
msg.validate()
# Validate header and burst randomization