Skip to content

Commit ba15b63

Browse files
committed
TST fix tests to account for changes in w3lib 1.19
1 parent 1d15812 commit ba15b63

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_http_response.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,10 @@ def test_invalid_utf8_encoded_body_with_valid_utf8_BOM(self):
272272
headers={"Content-type": ["text/html; charset=utf-8"]},
273273
body=b"\xef\xbb\xbfWORD\xe3\xab")
274274
self.assertEqual(r6.encoding, 'utf-8')
275-
self.assertEqual(r6.text, u'WORD\ufffd\ufffd')
275+
self.assertIn(r6.text, {
276+
u'WORD\ufffd\ufffd', # w3lib < 1.19.0
277+
u'WORD\ufffd', # w3lib >= 1.19.0
278+
})
276279

277280
def test_bom_is_removed_from_body(self):
278281
# Inferring encoding from body also cache decoded body as sideeffect,

0 commit comments

Comments
 (0)