isupport test

This commit is contained in:
Shivaram Lingamneni 2019-04-23 00:53:58 -04:00
parent 1d0c8687ee
commit 79f29a768a

View File

@ -0,0 +1,18 @@
from irctest import cases
from irctest.numerics import RPL_ISUPPORT
class StatusmsgTestCase(cases.BaseServerTestCase):
@cases.SpecificationSelector.requiredBySpecification('Oragono')
def testInIsupport(self):
"""Check that the expected STATUSMSG parameter appears in our isupport list."""
self.addClient()
self.sendLine(1, 'USER foo foo foo :foo')
self.sendLine(1, 'NICK bar')
self.skipToWelcome(1)
messages = self.getMessages(1)
isupport = set()
for message in messages:
if message.command == RPL_ISUPPORT:
isupport.update(message.params)
self.assertIn('STATUSMSG=~&@%+', isupport)