Skip to content

Commit

Permalink
Fixes for Nefarious and ircu2
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Sep 3, 2023
1 parent 0c97660 commit 5f8d3be
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions irctest/server_tests/connection_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,11 @@ def testNonutf8Realname(self):
if b"ERROR " in d or b" FAIL " in d:
# Rejected; nothing more to test.
return
if d.startswith(b"PING "):
line = d.split(b"\r\n")[0].replace(b"PING", b"PONG") + b"\r\n"
print("1 -> S (repr): " + repr(line))
self.clients[1].conn.sendall(line)
for line in d.split(b"\r\n"):
if line.startswith(b"PING "):
line = line.replace(b"PING", b"PONG") + b"\r\n"
print("1 -> S (repr): " + repr(line))
self.clients[1].conn.sendall(line)
else:
self.assertTrue(False, "stuck waiting")
self.sendLine(1, "WHOIS foo")
Expand All @@ -250,10 +251,11 @@ def testNonutf8Username(self):
if b" 468" in d or b"ERROR " in d:
# Rejected; nothing more to test.
return
if d.startswith(b"PING "):
line = d.split(b"\r\n")[0].replace(b"PING", b"PONG") + b"\r\n"
print("1 -> S (repr): " + repr(line))
self.clients[1].conn.sendall(line)
for line in d.split(b"\r\n"):
if line.startswith(b"PING "):
line = line.replace(b"PING", b"PONG") + b"\r\n"
print("1 -> S (repr): " + repr(line))
self.clients[1].conn.sendall(line)
else:
self.assertTrue(False, "stuck waiting")
self.sendLine(1, "WHOIS foo")
Expand Down

0 comments on commit 5f8d3be

Please sign in to comment.