@@ -262,7 +262,7 @@ def test_http_response_json():
262262 response = HttpResponse (url , body = b'{"key": "value"}' )
263263 assert response .json () == {"key" : "value" }
264264
265- response = HttpResponse (url , '{"ключ": "значение"}' .encode ("utf8" ))
265+ response = HttpResponse (url , body = '{"ключ": "значение"}' .encode ("utf8" ))
266266 assert response .json () == {"ключ" : "значение" }
267267
268268
@@ -274,7 +274,7 @@ def test_http_response_text():
274274 """
275275 text = "œ is a Weird Character"
276276 body = HttpResponseBody (b"\x9c is a Weird Character" )
277- response = HttpResponse ("http://example.com" , body )
277+ response = HttpResponse ("http://example.com" , body = body )
278278
279279 assert response .text == text
280280
@@ -293,7 +293,7 @@ def test_http_headers_declared_encoding(headers, encoding):
293293 headers = HttpResponseHeaders (headers )
294294 assert headers .declared_encoding () == encoding
295295
296- response = HttpResponse ("http://example.com" , b'' , headers = headers )
296+ response = HttpResponse ("http://example.com" , body = b'' , headers = headers )
297297 assert response .encoding == encoding or HttpResponse ._DEFAULT_ENCODING
298298
299299
@@ -307,14 +307,14 @@ def test_http_response_utf16():
307307
308308
309309def test_explicit_encoding ():
310- response = HttpResponse ("http://www.example.com" , "£" .encode ('utf-8' ),
310+ response = HttpResponse ("http://www.example.com" , body = "£" .encode ('utf-8' ),
311311 encoding = 'utf-8' )
312312 assert response .encoding == "utf-8"
313313 assert response .text == "£"
314314
315315
316316def test_explicit_encoding_invalid ():
317- response = HttpResponse ("http://www.example.com" , "£" .encode ('utf-8' ),
317+ response = HttpResponse ("http://www.example.com" , body = "£" .encode ('utf-8' ),
318318 encoding = 'latin1' )
319319 assert response .encoding == "latin1"
320320 assert response .text == "£" .encode ('utf-8' ).decode ("latin1" )
0 commit comments