Skip to content

Commit

Permalink
echo_message: Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Sep 2, 2023
1 parent 653d818 commit 8dc8224
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions irctest/server_tests/echo_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,17 @@ class EchoMessageTestCase(cases.BaseServerTestCase):
@cases.mark_capabilities("echo-message")
def testEchoMessage(self, command, solo, server_time):
"""<http://ircv3.net/specs/extensions/echo-message-3.2.html>"""
if server_time:
self.connectClient(
"baz",
capabilities=["echo-message", "server-time"],
skip_if_cap_nak=True,
)
else:
self.connectClient(
"baz",
capabilities=["echo-message", "server-time"],
skip_if_cap_nak=True,
)
capabilities = ["server-time"] if server_time else []

self.connectClient(
"baz",
capabilities=["echo-message", *capabilities],
skip_if_cap_nak=True,
)

self.sendLine(1, "JOIN #chan")

if not solo:
capabilities = ["server-time"] if server_time else None
self.connectClient("qux", capabilities=capabilities)
self.sendLine(2, "JOIN #chan")

Expand Down

0 comments on commit 8dc8224

Please sign in to comment.