We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d15812 commit ba15b63Copy full SHA for ba15b63
tests/test_http_response.py
@@ -272,7 +272,10 @@ def test_invalid_utf8_encoded_body_with_valid_utf8_BOM(self):
272
headers={"Content-type": ["text/html; charset=utf-8"]},
273
body=b"\xef\xbb\xbfWORD\xe3\xab")
274
self.assertEqual(r6.encoding, 'utf-8')
275
- self.assertEqual(r6.text, u'WORD\ufffd\ufffd')
+ self.assertIn(r6.text, {
276
+ u'WORD\ufffd\ufffd', # w3lib < 1.19.0
277
+ u'WORD\ufffd', # w3lib >= 1.19.0
278
+ })
279
280
def test_bom_is_removed_from_body(self):
281
# Inferring encoding from body also cache decoded body as sideeffect,
0 commit comments