diff --git a/irctest/server_tests/test_channel_operations.py b/irctest/server_tests/test_channel_operations.py index 86d5bfa..63cfde8 100644 --- a/irctest/server_tests/test_channel_operations.py +++ b/irctest/server_tests/test_channel_operations.py @@ -259,15 +259,15 @@ class JoinTestCase(cases.BaseServerTestCase): 'but: {msg}') m = self.getMessage(2) self.assertNotEqual(m.command, '323', # RPL_LISTEND - 'LIST response ended (ie. 323, aka RPL_LISTEND) without ' - 'listing any channel, whereas there is one.') + fail_msg='LIST response ended (ie. 323, aka RPL_LISTEND) ' + 'without listing any channel, whereas there is one.') self.assertMessageEqual(m, command='322', # RPL_LIST fail_msg='Second reply to LIST is not 322 (RPL_LIST), ' 'nor 323 (RPL_LISTEND) but: {msg}') m = self.getMessage(2) self.assertNotEqual(m.command, '322', # RPL_LIST - 'LIST response gives (at least) two channels, whereas there ' - 'is only one.') + fail_msg='LIST response gives (at least) two channels, ' + 'whereas there is only one.') self.assertMessageEqual(m, command='323', # RPL_LISTEND fail_msg='Third reply to LIST is not 322 (RPL_LIST) ' 'or 323 (RPL_LISTEND), or but: {msg}') diff --git a/irctest/server_tests/test_connection_registration.py b/irctest/server_tests/test_connection_registration.py index e06719a..54ccd15 100644 --- a/irctest/server_tests/test_connection_registration.py +++ b/irctest/server_tests/test_connection_registration.py @@ -65,14 +65,17 @@ class ConnectionRegistrationTestCase(cases.BaseServerTestCase): @cases.SpecificationSelector.requiredBySpecification('RFC2812') def testQuitErrors(self): - """“The server must close the connection to a client which sends a - QUIT message.” - -- + """“A client session is terminated with a quit message. The server + acknowledges this by sending an ERROR message to the client.” + -- """ self.connectClient('foo') self.getMessages(1) self.sendLine(1, 'QUIT') - commands = {m.command for me in self.getMessages(1)} + try: + commands = {m.command for me in self.getMessages(1)} + except ConnectionClosed: + assert False, 'Connection closed without ERROR.' self.assertIn('ERROR', commands, fail_msg='Did not receive ERROR as a reply to QUIT.')