Skip to content
Myr

Adapt test_response_decode_text_using_autodetect for chardet 6.0 (#3773)

Landed as b5addb6

authored by Ben Beasley · committed by the platform · parent ae1b9f6 · Browse files · 1 file+4 added−1 removed
This landing

State

Landed as b5addb6

By oscabriel

Diff stats

1 file+4 added−1 removed

  • tests:+4 added−1 removed

1 file+4 added−1 removed

modified:tests/models/test_responses.py+4 added-1 removed
1009 unmodified lines
1010 response = httpx.Response(200, content=content, default_encoding=autodetect)10111012 assert response.status_code == 2001013 assert response.reason_phrase == "OK"1014 assert response.encoding == "ISO-8859-1"1014 # The encoded byte string is consistent with either ISO-8859-1 or1015 # WINDOWS-1252. Versions <6.0 of chardet claim the former, while chardet1016 # 6.0 detects the latter.1017 assert response.encoding in ("ISO-8859-1", "WINDOWS-1252")1018 assert response.text == text101910201021def test_response_decode_text_using_explicit_encoding():
19 unmodified lines