Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/client/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def cp1252_but_no_content_type(request):

assert response.status_code == 200
assert response.reason_phrase == "OK"
assert response.encoding == "ISO-8859-1"
assert response.encoding in ("ISO-8859-1", "WINDOWS-1252")
assert response.text == text


Expand All @@ -453,7 +453,7 @@ def cp1252_but_no_content_type(request):
return httpx.Response(200, content=content)

transport = httpx.MockTransport(cp1252_but_no_content_type)
with httpx.Client(transport=transport, default_encoding=autodetect) as client:
with httpx.Client(transport=transport, default_encoding="ISO-8859-1") as client:
response = client.get("http://www.example.com")

assert response.status_code == 200
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_logging_request(server, caplog):
response = client.get(server.url)
assert response.status_code == 200

assert caplog.record_tuples == [
assert [record for record in caplog.record_tuples if record[0] == "httpx"] == [
(
"httpx",
logging.INFO,
Expand All @@ -71,7 +71,7 @@ def test_logging_redirect_chain(server, caplog):
response = client.get(server.url.copy_with(path="/redirect_301"))
assert response.status_code == 200

assert caplog.record_tuples == [
assert [record for record in caplog.record_tuples if record[0] == "httpx"] == [
(
"httpx",
logging.INFO,
Expand Down
Loading