From e9c48c1914395277aa7207c7ae1a8b2917a3351f Mon Sep 17 00:00:00 2001 From: Hemna Date: Tue, 27 Feb 2024 14:21:04 -0500 Subject: [PATCH] fix pep8 failures --- aprsd/threads/registry.py | 3 ++- tests/cmds/test_webchat.py | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/aprsd/threads/registry.py b/aprsd/threads/registry.py index 6b937e7..a3b22cb 100644 --- a/aprsd/threads/registry.py +++ b/aprsd/threads/registry.py @@ -10,6 +10,7 @@ from aprsd import threads as aprsd_threads CONF = cfg.CONF LOG = logging.getLogger("APRSD") + class APRSRegistryThread(aprsd_threads.APRSDThread): """This sends service information to the configured APRS Registry.""" _loop_cnt: int = 1 @@ -34,7 +35,7 @@ class APRSRegistryThread(aprsd_threads.APRSDThread): "description": CONF.registry.description, "service_website": CONF.registry.service_website, "software": f"APRSD version {aprsd.__version__} " - "https://github.com/craigerl/aprsd", + "https://github.com/craigerl/aprsd", } try: requests.post( diff --git a/tests/cmds/test_webchat.py b/tests/cmds/test_webchat.py index 53deb0d..88e38e1 100644 --- a/tests/cmds/test_webchat.py +++ b/tests/cmds/test_webchat.py @@ -56,17 +56,20 @@ class TestSendMessageCommand(unittest.TestCase): msg_number=1, message_format=core.PACKET_TYPE_ACK, ) + mock_queue = mock.MagicMock() socketio = mock.MagicMock() - wcp = webchat.WebChatProcessPacketThread(packet, socketio) + wcp = webchat.WebChatProcessPacketThread(mock_queue, socketio) wcp.process_ack_packet(packet) mock_remove.called_once() mock_socketio.called_once() + @mock.patch("aprsd.threads.tx.send") @mock.patch("aprsd.packets.PacketList.rx") @mock.patch("aprsd.cmds.webchat.socketio") def test_process_our_message_packet( self, + mock_tx_send, mock_packet_add, mock_socketio, ): @@ -77,8 +80,9 @@ class TestSendMessageCommand(unittest.TestCase): msg_number=1, message_format=core.PACKET_TYPE_MESSAGE, ) + mock_queue = mock.MagicMock() socketio = mock.MagicMock() - wcp = webchat.WebChatProcessPacketThread(packet, socketio) + wcp = webchat.WebChatProcessPacketThread(mock_queue, socketio) wcp.process_our_message_packet(packet) mock_packet_add.called_once()