From c6663bc9b60755b95517b194d28ed372026186fa Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Wed, 30 Nov 2016 01:40:03 +1000 Subject: [PATCH] LIST: make RPL_LISTSTART optional (as it is today) --- irctest/server_tests/test_channel_operations.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/irctest/server_tests/test_channel_operations.py b/irctest/server_tests/test_channel_operations.py index e947a41..d6cb559 100644 --- a/irctest/server_tests/test_channel_operations.py +++ b/irctest/server_tests/test_channel_operations.py @@ -233,10 +233,9 @@ class JoinTestCase(cases.BaseServerTestCase): self.getMessages(1) self.sendLine(2, 'LIST') m = self.getMessage(2) - self.assertMessageEqual(m, command='321', # RPL_LISTSTART - fail_msg='First reply to LIST is not 321 (RPL_LISTSTART), ' - 'but: {msg}') - m = self.getMessage(2) + if m.command == '321': + # skip RPL_LISTSTART + m = self.getMessage(2) self.assertNotEqual(m.command, '322', # RPL_LIST 'LIST response gives (at least) one channel, whereas there ' 'is none.') @@ -256,10 +255,9 @@ class JoinTestCase(cases.BaseServerTestCase): self.getMessages(1) self.sendLine(2, 'LIST') m = self.getMessage(2) - self.assertMessageEqual(m, command='321', # RPL_LISTSTART - fail_msg='First reply to LIST is not 321 (RPL_LISTSTART), ' - 'but: {msg}') - m = self.getMessage(2) + if m.command == '321': + # skip RPL_LISTSTART + m = self.getMessage(2) self.assertNotEqual(m.command, '323', # RPL_LISTEND fail_msg='LIST response ended (ie. 323, aka RPL_LISTEND) ' 'without listing any channel, whereas there is one.')