Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1175215?usp=email )
Change subject: Tests: skip test if IP is blocked
......................................................................
Tests: skip test if IP is blocked
Fix HTTP response.
Bug: T399367
Change-Id: I27fd16da1da8003706d510abe1e70119dc84737f
---
M pywikibot/data/api/_requests.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api/_requests.py b/pywikibot/data/api/_requests.py
index 248f5e2..0186acc 100644
--- a/pywikibot/data/api/_requests.py
+++ b/pywikibot/data/api/_requests.py
@@ -759,7 +759,7 @@
{text}
"""
if TEST_RUNNING:
- if response.status_code == 402 \
+ if response.status_code == 403 \
and 'Requests from your IP have been blocked' in text:
raise unittest.SkipTest(msg) # T399367
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1175215?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I27fd16da1da8003706d510abe1e70119dc84737f
Gerrit-Change-Number: 1175215
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]