mirror of https://github.com/progval/irctest.git
Allow ERR_NOSUCHCHANNEL as a response for PART from an empty/inexistant channel.
This commit is contained in:
parent
74443bb6ae
commit
10dbd84156
|
@ -69,7 +69,7 @@ class JoinTestCase(cases.BaseServerTestCase):
|
||||||
-- <https://tools.ietf.org/html/rfc1459#section-6.1>
|
-- <https://tools.ietf.org/html/rfc1459#section-6.1>
|
||||||
and <https://tools.ietf.org/html/rfc2812#section-5.2>
|
and <https://tools.ietf.org/html/rfc2812#section-5.2>
|
||||||
|
|
||||||
ERR_NOSUCHCHANNEL should only be used for invalid
|
According to RFCs, ERR_NOSUCHCHANNEL should only be used for invalid
|
||||||
channel names:
|
channel names:
|
||||||
“403 ERR_NOSUCHCHANNEL
|
“403 ERR_NOSUCHCHANNEL
|
||||||
"<channel name> :No such channel"
|
"<channel name> :No such channel"
|
||||||
|
@ -77,11 +77,15 @@ class JoinTestCase(cases.BaseServerTestCase):
|
||||||
- Used to indicate the given channel name is invalid.”
|
- Used to indicate the given channel name is invalid.”
|
||||||
-- <https://tools.ietf.org/html/rfc1459#section-6.1>
|
-- <https://tools.ietf.org/html/rfc1459#section-6.1>
|
||||||
and <https://tools.ietf.org/html/rfc2812#section-5.2>
|
and <https://tools.ietf.org/html/rfc2812#section-5.2>
|
||||||
|
|
||||||
|
However, many implementations use 479 instead, so let's allow it.
|
||||||
|
<http://danieloaks.net/irc-defs/defs/ircnumerics.html#403>
|
||||||
|
<http://danieloaks.net/irc-defs/defs/ircnumerics.html#479>
|
||||||
"""
|
"""
|
||||||
self.connectClient('foo')
|
self.connectClient('foo')
|
||||||
self.sendLine(1, 'PART #chan')
|
self.sendLine(1, 'PART #chan')
|
||||||
m = self.getMessage(1)
|
m = self.getMessage(1)
|
||||||
self.assertMessageEqual(m, command='442') # ERR_NOTONCHANNEL
|
self.assertIn(m.command, {'442', '403'}) # ERR_NOTONCHANNEL, ERR_NOSUCHCHANNEL
|
||||||
|
|
||||||
def testJoinTwice(self):
|
def testJoinTwice(self):
|
||||||
self.connectClient('foo')
|
self.connectClient('foo')
|
||||||
|
|
Loading…
Reference in New Issue