From 10edb9dd9dac7f42fbb25e36efff355a285fb5bd Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 22 Feb 2021 13:46:34 -0500 Subject: [PATCH] fix LUSERS tests to work with oragono --- irctest/client_mock.py | 2 ++ irctest/server_tests/test_lusers.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/irctest/client_mock.py b/irctest/client_mock.py index dd2086c..b3d5781 100644 --- a/irctest/client_mock.py +++ b/irctest/client_mock.py @@ -35,6 +35,8 @@ class ClientMock: if synchronize: token = "synchronize{}".format(time.monotonic()) self.sendLine("PING {}".format(token)) + else: + token = None got_pong = False data = b"" (self.inbuffer, messages) = ([], self.inbuffer) diff --git a/irctest/server_tests/test_lusers.py b/irctest/server_tests/test_lusers.py index d4fbe24..b23f1da 100644 --- a/irctest/server_tests/test_lusers.py +++ b/irctest/server_tests/test_lusers.py @@ -132,7 +132,7 @@ class LusersUnregisteredTestCase(LusersTestCase): def _synchronize(self, client_name): """Synchronizes using a PING, but accept ERR_NOTREGISTERED as a response.""" - self.sendLine(client_name, "PING") + self.sendLine(client_name, "PING PARAM") for _ in range(1000): msg = self.getRegistrationMessage(client_name) if msg.command in (ERR_NOTREGISTERED, "PONG"):