Skip to content

Commit

Permalink
Keep request params tests that break main only
Browse files Browse the repository at this point in the history
  • Loading branch information
GreyElaina committed Dec 3, 2024
1 parent bcd1ea9 commit 70b7b6c
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions tests/models/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,25 +228,15 @@ def content() -> typing.Iterator[bytes]:
assert pickle_request.content == b"test 123"


def test_with_params():
request = httpx.Request("GET", "http://example.com", params={"a": "1", "b": "2"})
assert str(request.url) == "http://example.com?a=1&b=2"


def test_merge_existing_params():
def test_request_params():
request = httpx.Request(
"GET", "http://example.com?c=3", params={"a": "1", "b": "2"}
"GET", "http://example.com?c=3",params={"a": "1", "b": "2"}
)
assert str(request.url) == "http://example.com?c=3&a=1&b=2"


def test_empty_params():
request = httpx.Request("GET", "http://example.com", params={})
assert str(request.url) == "http://example.com"

request = httpx.Request("GET", "http://example.com?a=1", params={})
assert str(request.url) == "http://example.com?a=1"


def test_override_params():
request = httpx.Request("GET", "http://example.com?a=1", params={"a": "2"})
assert str(request.url) == "http://example.com?a=2"

0 comments on commit 70b7b6c

Please sign in to comment.