Fix RFC1459 tests to pass with charybdis

only oragono replies to PINGs before a valid NICK afaik.
This commit is contained in:
Valentin Lorentz 2021-02-16 00:17:48 +01:00
parent 9b2a6a063c
commit d69c41756b

View File

@ -87,12 +87,16 @@ class RegressionsTestCase(cases.BaseServerTestCase):
self.addClient(1)
self.sendLine(1, 'NICK *')
self.sendLine(1, 'USER u s e r')
replies = set(msg.command for msg in self.getMessages(1))
replies = {'NOTICE'}
while replies == {'NOTICE'}:
replies = set(msg.command for msg in self.getMessages(1, synchronize=False))
self.assertIn(ERR_ERRONEUSNICKNAME, replies)
self.assertNotIn(RPL_WELCOME, replies)
self.sendLine(1, 'NICK valid')
replies = set(msg.command for msg in self.getMessages(1))
replies = {'NOTICE'}
while replies == {'NOTICE'}:
replies = set(msg.command for msg in self.getMessages(1, synchronize=False))
self.assertNotIn(ERR_ERRONEUSNICKNAME, replies)
self.assertIn(RPL_WELCOME, replies)
@ -101,7 +105,9 @@ class RegressionsTestCase(cases.BaseServerTestCase):
self.addClient(1)
self.sendLine(1, 'NICK :')
self.sendLine(1, 'USER u s e r')
replies = set(msg.command for msg in self.getMessages(1))
replies = {'NOTICE'}
while replies == {'NOTICE'}:
replies = set(msg.command for msg in self.getMessages(1, synchronize=False))
self.assertNotIn(RPL_WELCOME, replies)
@cases.SpecificationSelector.requiredBySpecification('RFC1459')