mirror of
https://github.com/progval/irctest.git
synced 2025-04-06 07:19:54 +00:00
Enable IRCv3 for InspIRCd.
This commit is contained in:
@ -10,6 +10,9 @@ from irctest.basecontrollers import BaseServerController, DirectoryBasedControll
|
||||
TEMPLATE_CONFIG = """
|
||||
<bind address="{hostname}" port="{port}" type="clients">
|
||||
<module name="cap">
|
||||
<module name="ircv3">
|
||||
<module name="ircv3_capnotify">
|
||||
<connect allow="*" resolvehostnames="no"> # Faster
|
||||
"""
|
||||
|
||||
class InspircdController(BaseServerController, DirectoryBasedController):
|
||||
|
@ -2,11 +2,15 @@ from irctest import cases
|
||||
from irctest.irc_utils.message_parser import Message
|
||||
|
||||
class CapTestCase(cases.BaseServerTestCase):
|
||||
def testNoCap(self):
|
||||
def testNoReq(self):
|
||||
self.addClient(1)
|
||||
self.sendLine(1, 'CAP LS 302')
|
||||
while True: # Ignore boring connection messages
|
||||
m = self.getMessage(1)
|
||||
if m.command != 'NOTICE':
|
||||
break
|
||||
print(m)
|
||||
m = self.getMessage(1, filter_pred=lambda m:m.command != 'NOTICE')
|
||||
self.assertEqual(m.command, 'CAP')
|
||||
self.assertEqual(len(m.params), 3, m)
|
||||
self.assertEqual(m.params[0:2], ['*', 'LS'], m)
|
||||
self.sendLine(1, 'USER foo foo foo :foo')
|
||||
self.sendLine(1, 'NICK foo')
|
||||
self.sendLine(1, 'CAP END')
|
||||
m = self.getMessage(1, filter_pred=lambda m:m.command != 'NOTICE')
|
||||
self.assertEqual(m.command, '001')
|
||||
|
Reference in New Issue
Block a user