File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ def to_kwargs(self) -> dict[str, Any]:
2727 """Convert the object to a dictionary of keyword arguments for requests."""
2828 output = {}
2929 for property in ["headers" , "json" , "query" ]:
30- output [property ] = getattr (self , property )
30+ key = property if property != "query" else "params"
31+ output [key ] = getattr (self , property )
3132 return output
3233
3334
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def test_api_request_args() -> None:
3939 assert args .to_kwargs () == {
4040 "headers" : {"headers" : "value" },
4141 "json" : {"payload" : "value" },
42- "query " : {"query" : "value" },
42+ "params " : {"query" : "value" },
4343 }
4444
4545
@@ -53,7 +53,7 @@ def test_api_request_empty_args() -> None:
5353 assert args .to_kwargs () == {
5454 "headers" : {},
5555 "json" : {},
56- "query " : {},
56+ "params " : {},
5757 }
5858
5959
You can’t perform that action at this time.
0 commit comments