https://travis-ci.org/wikimedia/pywikibot-core/jobs/209768127#L4197
=================================== FAILURES =================================== ________________ HttpsCertificateTestCase.test_https_cert_error ________________ self = <tests.http_tests.HttpsCertificateTestCase testMethod=test_https_cert_error> def test_https_cert_error(self): """Test if http.fetch respects disable_ssl_certificate_validation.""" self.assertRaisesRegex(pywikibot.FatalServerError, self.CERT_VERIFY_FAILED_RE, http.fetch, uri='https://testssl-expire-r2i2.disig.sk/index.en.html') http.session.close() # clear the connection with warnings.catch_warnings(record=True) as warning_log: response = http.fetch( uri='https://testssl-expire-r2i2.disig.sk/index.en.html', disable_ssl_certificate_validation=True) r = response.content self.assertIsInstance(r, unicode) self.assertTrue(re.search(r'<title>.*</title>', r)) http.session.close() # clear the connection # Verify that it now fails again self.assertRaisesRegex(pywikibot.FatalServerError, self.CERT_VERIFY_FAILED_RE, http.fetch, uri='https://testssl-expire-r2i2.disig.sk/index.en.html') http.session.close() # clear the connection # Verify that the warning occurred > self.assertEqual(len(warning_log), 1) E AssertionError: 2 != 1