diff --git a/landscape/client/broker/tests/test_transport.py b/landscape/client/broker/tests/test_transport.py index fece3b0f..3baf7435 100644 --- a/landscape/client/broker/tests/test_transport.py +++ b/landscape/client/broker/tests/test_transport.py @@ -193,16 +193,10 @@ def test_ssl_verification_negative(self): message_api=b"X.Y", ) - def got_result(ignored): + def got_result(failure): self.assertIs(r.request, None) self.assertIs(r.content, None) - logfile_value = self.logfile.getvalue() - # pycurl error messages vary by version. - # First is for <= noble, second for > noble. - self.assertTrue( - "server certificate verification failed" in logfile_value - or "SSL certificate problem" in logfile_value, - ) + self.assertEqual(failure.value.error_code, 60) result.addErrback(got_result) return result