jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
tests/http_tests.py: Fix unittest.skipTest calls

'unittest.skipTest' does not exist. Replace it with `self.skipTest`.

Bug: T204204
Change-Id: I6a4e55cc2e38a0ba26d9e881c125e9feaee6b326
---
M tests/http_tests.py
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/http_tests.py b/tests/http_tests.py
index 5125eec..2264e2b 100644
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -652,8 +652,8 @@
"""Test fetch method with no parameters."""
r = http.fetch(uri=self.url, params={})
if r.status == 503: # T203637
- unittest.skipTest('503: Service currently not available for '
- + self.url)
+ self.skipTest(
+ '503: Service currently not available for ' + self.url)
self.assertEqual(r.status, 200)

content = json.loads(r.text)
@@ -668,8 +668,8 @@
"""
r = http.fetch(uri=self.url, params={'fish&chips': 'delicious'})
if r.status == 503: # T203637
- unittest.skipTest('503: Service currently not available for '
- + self.url)
+ self.skipTest(
+ '503: Service currently not available for ' + self.url)
self.assertEqual(r.status, 200)

content = json.loads(r.text)
@@ -684,8 +684,8 @@
"""
r = http.fetch(uri=self.url, params={'fish%26chips': 'delicious'})
if r.status == 503: # T203637
- unittest.skipTest('503: Service currently not available for '
- + self.url)
+ self.skipTest(
+ '503: Service currently not available for ' + self.url)
self.assertEqual(r.status, 200)

content = json.loads(r.text)

To view, visit change 460319. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6a4e55cc2e38a0ba26d9e881c125e9feaee6b326
Gerrit-Change-Number: 460319
Gerrit-PatchSet: 2
Gerrit-Owner: Dalba <dalba.wiki@gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)