diff --git a/irctest/server_tests/test_channel_operations.py b/irctest/server_tests/test_channel_operations.py index c85650e..053ebc7 100644 --- a/irctest/server_tests/test_channel_operations.py +++ b/irctest/server_tests/test_channel_operations.py @@ -69,19 +69,23 @@ class JoinTestCase(cases.BaseServerTestCase): -- and - ERR_NOSUCHCHANNEL should only be used for invalid - channel names: - “403 ERR_NOSUCHCHANNEL - " :No such channel" + According to RFCs, ERR_NOSUCHCHANNEL should only be used for invalid + channel names: + “403 ERR_NOSUCHCHANNEL + " :No such channel" - - Used to indicate the given channel name is invalid.” - -- - and + - Used to indicate the given channel name is invalid.” + -- + and + + However, many implementations use 479 instead, so let's allow it. + + """ self.connectClient('foo') self.sendLine(1, 'PART #chan') m = self.getMessage(1) - self.assertMessageEqual(m, command='442') # ERR_NOTONCHANNEL + self.assertIn(m.command, {'442', '403'}) # ERR_NOTONCHANNEL, ERR_NOSUCHCHANNEL def testJoinTwice(self): self.connectClient('foo')