Skip to content

Commit

Permalink
tweak special-casing
Browse files Browse the repository at this point in the history
  • Loading branch information
slingamn committed Jun 9, 2024
1 parent f4c4539 commit bceb132
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions irctest/server_tests/chmodes/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def setupNicks(self):
self.getMessages("unrelated")

@cases.mark_specifications("Modern")
@cases.xfailIfSoftware(["irc2"], "broken in irc2")
def testChannelOperatorModeSenderPrivsNeeded(self):
"""Test that +o from a channel member without the necessary privileges
fails as expected."""
Expand Down Expand Up @@ -60,10 +61,14 @@ def testChannelOperatorModeTargetDoesNotExist(self):
self.sendLine("chanop", "MODE #chan +o nobody")
messages = self.getMessages("chanop")
# ERR_NOSUCHNICK is typical, Bahamut additionally sends ERR_USERNOTINCHANNEL
self.assertGreaterEqual(len(messages), 1)
self.assertLessEqual(len(messages), 2)
for message in messages:
self.assertIn(message.command, [ERR_NOSUCHNICK, ERR_USERNOTINCHANNEL])
if self.controller.software_name != "Bahamut":
self.assertEqual(len(messages), 1)
self.assertMessageMatch(messages[0], command=ERR_NOSUCHNICK)
else:
self.assertLessEqual(len(messages), 2)
commands = {message.command for message in messages}
self.assertLessEqual({ERR_NOSUCHNICK}, commands)
self.assertLessEqual(commands, {ERR_NOSUCHNICK, ERR_USERNOTINCHANNEL})

@cases.mark_specifications("Modern")
def testChannelOperatorModeChannelDoesNotExist(self):
Expand Down

0 comments on commit bceb132

Please sign in to comment.