Skip to content

Commit

Permalink
Rename allow_redirects to follow_redirects in test (#26)
Browse files Browse the repository at this point in the history
Motivation
--
- There is [a breaking change](encode/httpx#1808) replacing `allow_redirects` with `follow_redirects` in `httpx`.
- Without changing our test case, it is possible that developers/users can be confused by our code.
  • Loading branch information
hexoul authored Dec 31, 2021
1 parent 69358e5 commit fe08d8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
def test_set_request_headers():
for method in ["get", "post", "delete", "patch"]:
kwargs = client_with_configs._set_request_headers(
method, params={"a": "b"}, allow_redirects=True
method, params={"a": "b"}, follow_redirects=True
)
content_type = (
"application/json-patch+json" if method == "patch" else "application/json"
Expand All @@ -53,7 +53,7 @@ def test_set_request_headers():
"Content-Type": content_type,
}
assert kwargs["params"] == {"a": "b"}
assert kwargs["allow_redirects"]
assert kwargs["follow_redirects"]
assert "limits" not in kwargs
assert "event_hooks" not in kwargs
assert "transport" not in kwargs
Expand Down

0 comments on commit fe08d8a

Please sign in to comment.