mirror of
https://github.com/progval/irctest.git
synced 2025-04-07 15:59:49 +00:00
add a test for WHOIS on nonexistent users (#258)
* add a test for WHOIS on nonexistent users * skip test in Sable for now
This commit is contained in:
committed by
GitHub
parent
e6d54db9ce
commit
c0e6ca4dde
@ -8,6 +8,7 @@ import pytest
|
|||||||
|
|
||||||
from irctest import cases
|
from irctest import cases
|
||||||
from irctest.numerics import (
|
from irctest.numerics import (
|
||||||
|
ERR_NOSUCHNICK,
|
||||||
RPL_AWAY,
|
RPL_AWAY,
|
||||||
RPL_ENDOFWHOIS,
|
RPL_ENDOFWHOIS,
|
||||||
RPL_WHOISACCOUNT,
|
RPL_WHOISACCOUNT,
|
||||||
@ -217,6 +218,25 @@ class WhoisTestCase(_WhoisTestMixin, cases.BaseServerTestCase):
|
|||||||
whois_user.params[3], [nick, username, "~" + username, realname]
|
whois_user.params[3], [nick, username, "~" + username, realname]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@cases.mark_specifications("RFC2812")
|
||||||
|
@cases.xfailIfSoftware(["Sable"], "https://github.com/Libera-Chat/sable/issues/101")
|
||||||
|
def testWhoisMissingUser(self):
|
||||||
|
"""Test WHOIS on a nonexistent nickname."""
|
||||||
|
self.connectClient("qux", name="qux")
|
||||||
|
self.sendLine("qux", "WHOIS bar")
|
||||||
|
messages = self.getMessages("qux")
|
||||||
|
self.assertEqual(len(messages), 2)
|
||||||
|
self.assertMessageMatch(
|
||||||
|
messages[0],
|
||||||
|
command=ERR_NOSUCHNICK,
|
||||||
|
params=["qux", "bar", ANYSTR],
|
||||||
|
)
|
||||||
|
self.assertMessageMatch(
|
||||||
|
messages[1],
|
||||||
|
command=RPL_ENDOFWHOIS,
|
||||||
|
params=["qux", "bar", ANYSTR],
|
||||||
|
)
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"away,oper",
|
"away,oper",
|
||||||
[(False, False), (True, False), (False, True)],
|
[(False, False), (True, False), (False, True)],
|
||||||
|
Reference in New Issue
Block a user