Xqt has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1183138?usp=email )

Change subject: [bugfix] Use 'User-Agent' with BinaryTestCase.test_requests
......................................................................

[bugfix] Use 'User-Agent' with BinaryTestCase.test_requests

User agent is needed due to T400119

Bug: T403271
Change-Id: Ie4932fa56bd8f856422cea383f162c5efce241e8
---
M tests/http_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Xqt: Verified; Looks good to me, approved




diff --git a/tests/http_tests.py b/tests/http_tests.py
index a921742..e365242 100755
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -480,7 +480,7 @@
     def test_requests(self) -> None:
         """Test with requests, underlying package."""
         with requests.Session() as s:
-            r = s.get(self.url)
+            r = s.get(self.url, headers={'User-Agent': http.user_agent()})

             self.assertEqual(r.headers['content-type'], 'image/png')
             self.assertEqual(r.content, self.png)

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1183138?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: Ie4932fa56bd8f856422cea383f162c5efce241e8
Gerrit-Change-Number: 1183138
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <i...@gno.de>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org
To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org

Reply via email to