Add protocol test for CQ - QRV

This commit is contained in:
Pedro 2023-12-04 16:01:18 +01:00
parent a2edf4967a
commit 22912c9c1e

View file

@ -8,6 +8,7 @@ import helpers
import queue
from state_manager import StateManager
from command_ping import PingCommand
from command_cq import CQCommand
class TestDataFrameFactory(unittest.TestCase):
@ -55,5 +56,18 @@ class TestDataFrameFactory(unittest.TestCase):
self.shortcutTransmission()
self.assertEventReceivedType('PING_ACK')
def testCQWithQRV(self):
self.config['MODEM']['respond_to_cq'] = True
api_params = {}
cmd = CQCommand(self.config, self.state_manager, self.event_queue, api_params)
cmd.run(self.event_queue, self.modem_transmit_queue)
self.shortcutTransmission()
self.assertEventReceivedType('CQ')
self.shortcutTransmission()
self.assertEventReceivedType('QRV')
if __name__ == '__main__':
unittest.main()