jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/345172 )
Change subject: test_https_cert_error: Ignore other warnings
......................................................................
test_https_cert_error: Ignore other warnings
Make sure InsecureRequestWarning is raised but ignore other warnings.
Bug: T161371
Change-Id: I5aed8de8739a4d955320be2c1cb9da00ab6c0ae7
---
M tests/http_tests.py
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/tests/http_tests.py b/tests/http_tests.py
index c1ce2f0..af3e5d9 100644
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -159,9 +159,8 @@
http.session.close() # clear the connection
# Verify that the warning occurred
- self.assertEqual(len(warning_log), 1)
- self.assertEqual(warning_log[0].category.__name__,
- 'InsecureRequestWarning')
+ self.assertIn('InsecureRequestWarning',
+ [w.category.__name__ for w in warning_log])
class TestHttpStatus(HttpbinTestCase):
--
To view, visit
https://gerrit.wikimedia.org/r/345172
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5aed8de8739a4d955320be2c1cb9da00ab6c0ae7
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>