jenkins-bot has submitted this change and it was merged.
Change subject: Use httpbin.org for http status code.
......................................................................
Use httpbin.org for http status code.
Switch from using
getstatuscode.com to httpbin.org in tests/tests.py
eg:
http://getstatuscode.com/XXX to
http://httpbin.org/status/XXX
Change in the 'sites' variable. Switch from getstatuscode to httpbin.
Bug: T97242
Change-Id: I5f3a8904db54cc016a8891a33772ed8ea280567d
---
M tests/http_tests.py
M tests/tests_tests.py
2 files changed, 6 insertions(+), 6 deletions(-)
Approvals:
John Vandenberg: Looks good to me, but someone else must approve
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/http_tests.py b/tests/http_tests.py
index a624cdb..498770c 100644
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -145,8 +145,8 @@
"""Test HTTP status code handling and errors."""
sites = {
- 'getstatuscode': {
- 'hostname': 'getstatuscode.com',
+ 'httpbin': {
+ 'hostname': 'httpbin.org',
},
'enwp': {
'hostname': 'en.wikipedia.org',
@@ -160,7 +160,7 @@
"""Test that a HTTP 504 raises the correct
exception."""
self.assertRaises(pywikibot.Server504Error,
http.fetch,
-
uri='http://getstatuscode.com/504')
+
uri='http://httpbin.org/status/504')
def test_server_not_found(self):
"""Test server not found exception."""
@@ -199,7 +199,7 @@
"""Test that maximum redirect exception doesn't hang
up."""
self.assertRaises(httplib2.RedirectLimit,
http.fetch,
-
uri='http://getstatuscode.com/300')
+
uri='http://httpbin.org/status/300')
class ThreadedHttpTestCase(TestCase):
diff --git a/tests/tests_tests.py b/tests/tests_tests.py
index c95c57d..499008b 100755
--- a/tests/tests_tests.py
+++ b/tests/tests_tests.py
@@ -21,12 +21,12 @@
sites = {
'502': {
- 'hostname': 'http://getstatuscode.com/502',
+ 'hostname': 'http://httpbin.org/status/502',
}
}
def test_502(self):
- """Test a HTTP 502 response using
http://getstatuscode.com/502."""
+ """Test a HTTP 502 response using
http://httpbin.org/status/502."""
self.fail('The test framework should skip this test.')
pass
--
To view, visit
https://gerrit.wikimedia.org/r/215248
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5f3a8904db54cc016a8891a33772ed8ea280567d
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: AkshitKumar <akshitkumar100(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>