jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Usage of HttpRequest in CharsetTestCase ......................................................................
[FIX] Usage of HttpRequest in CharsetTestCase
The uri of None is invalid. Use '' instead of None as uri in the constructor of HttpRequest.
Change-Id: I9803bb5e0a4db0baead3fba1d55f1493139402ba --- M tests/http_tests.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/http_tests.py b/tests/http_tests.py index 3f08693..913fb8c 100644 --- a/tests/http_tests.py +++ b/tests/http_tests.py @@ -271,7 +271,7 @@
@staticmethod def _create_request(charset=None, data=UTF8_BYTES): - req = threadedhttp.HttpRequest(None, charset=charset) + req = threadedhttp.HttpRequest('', charset=charset) resp = requests.Response() resp.headers = {'content-type': 'charset=utf-8'} resp._content = data[:] @@ -280,7 +280,7 @@
def test_no_charset(self): """Test decoding without explicit charset.""" - req = threadedhttp.HttpRequest(None) + req = threadedhttp.HttpRequest('') resp = requests.Response() resp.headers = {'content-type': ''} resp._content = CharsetTestCase.LATIN1_BYTES[:]
pywikibot-commits@lists.wikimedia.org