From cdb66072610aee2b621e7c5f79280e0c93f1e0df Mon Sep 17 00:00:00 2001 From: sebres Date: Wed, 22 Nov 2023 20:00:50 +0100 Subject: [PATCH] remove double call of inherited setup in test cases; previously caused that after that no restore of log-handler takes place in `tearDown` later, so after that tests it remains by `LogCaptureTestCase._MemHandler`, so every future logged message disappear in nirvana; partially fixes #3635 --- fail2ban/tests/sockettestcase.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fail2ban/tests/sockettestcase.py b/fail2ban/tests/sockettestcase.py index 4eb3a375..5c674620 100644 --- a/fail2ban/tests/sockettestcase.py +++ b/fail2ban/tests/sockettestcase.py @@ -54,7 +54,6 @@ class Socket(LogCaptureTestCase): def setUp(self): """Call before every test case.""" - LogCaptureTestCase.setUp(self) super(Socket, self).setUp() self.server = AsyncServer(self) sock_fd, sock_name = tempfile.mkstemp('fail2ban.sock', 'f2b-socket') @@ -68,7 +67,7 @@ class Socket(LogCaptureTestCase): if self.serverThread: self.server.stop(); # stop if not already stopped self._stopServerThread() - LogCaptureTestCase.tearDown(self) + super(Socket, self).tearDown() @staticmethod def proceed(message):