mirror of
https://github.com/craigerl/aprsd.git
synced 2025-04-10 13:39:33 -04:00
fix pep8 failures
This commit is contained in:
parent
f0ad6d7577
commit
e9c48c1914
@ -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(
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user