Merge remote-tracking branch 'origin/master' into throttling

This commit is contained in:
Adrian Chaves 2026-07-01 12:58:53 +02:00
commit 7cae0e53fb
1 changed files with 3 additions and 2 deletions

View File

@ -163,12 +163,13 @@ class TestTextResponse(TestResponse):
def test_utf16(self):
"""Test utf-16 because UnicodeDammit is known to have problems with"""
body = b"\xff\xfeh\x00i\x00"
r = self.response_class(
"http://www.example.com",
body=b"\xff\xfeh\x00i\x00",
body=body,
encoding="utf-16",
)
self._assert_response_values(r, "utf-16", "hi")
self._assert_response_values(r, "utf-16", body)
def test_invalid_utf8_encoded_body_with_valid_utf8_BOM(self):
r6 = self.response_class(