Fix some tests to pass with inspircd

This commit is contained in:
Valentin Lorentz 2021-02-20 09:53:30 +01:00
parent 3932a40d74
commit 3d7a539d06
3 changed files with 5 additions and 3 deletions

View File

@ -38,7 +38,7 @@ class PasswordedConnectionRegistrationTestCase(cases.BaseServerTestCase):
self.assertNotEqual(m.command, '001', self.assertNotEqual(m.command, '001',
msg='Got 001 after NICK+USER but incorrect PASS') msg='Got 001 after NICK+USER but incorrect PASS')
@cases.SpecificationSelector.requiredBySpecification('RFC1459', 'RFC2812') @cases.SpecificationSelector.requiredBySpecification('RFC1459', 'RFC2812', strict=True)
def testPassAfterNickuser(self): def testPassAfterNickuser(self):
"""“The password can and must be set before any attempt to register """“The password can and must be set before any attempt to register
the connection is made. the connection is made.

View File

@ -56,7 +56,9 @@ class NoticeTestCase(cases.BaseServerTestCase):
@cases.SpecificationSelector.requiredBySpecification('RFC1459', 'RFC2812') @cases.SpecificationSelector.requiredBySpecification('RFC1459', 'RFC2812')
def testNoticeNonexistentChannel(self): def testNoticeNonexistentChannel(self):
""" """
'automatic replies MUST NEVER be sent in response to a NOTICE message' 'automatic replies MUST NEVER be sent in response to a NOTICE message.
This rule applies to servers too - they MUST NOT send any error repl
back to the client on receipt of a notice.'
https://tools.ietf.org/html/rfc2812#section-3.3.2> https://tools.ietf.org/html/rfc2812#section-3.3.2>
""" """
self.connectClient('foo') self.connectClient('foo')

View File

@ -99,7 +99,7 @@ class RegressionsTestCase(cases.BaseServerTestCase):
self.sendLine(1, 'NICK valid') self.sendLine(1, 'NICK valid')
replies = {'NOTICE'} replies = {'NOTICE'}
while replies == {'NOTICE'}: while replies <= {'NOTICE'}:
replies = set(msg.command for msg in self.getMessages(1, synchronize=False)) replies = set(msg.command for msg in self.getMessages(1, synchronize=False))
self.assertNotIn(ERR_ERRONEUSNICKNAME, replies) self.assertNotIn(ERR_ERRONEUSNICKNAME, replies)
self.assertIn(RPL_WELCOME, replies) self.assertIn(RPL_WELCOME, replies)