| 488 | |
| 489 | |
| 490 | async def test_query_params(send: Send) -> None: |
| 491 | assert await send.query( |
| 492 | {"created_at[gte]": datetime(2024, 1, 2, 3, 4, 5, tzinfo=timezone.utc), "x": omit, "y": not_given, "n": None}, |
| 493 | extra_query={"x": "1"}, |
| 494 | ) == {"created_at[gte]": "2024-01-02T03:04:05+00:00", "x": "1"} |
| 495 | assert send.request.url.query == b"created_at%5Bgte%5D=2024-01-02T03%3A04%3A05%2B00%3A00&x=1" |
| 496 | assert await send.query({"on": date(2024, 1, 2), "flag": True, "n": 3}) == { |
| 497 | "on": "2024-01-02", |
| 498 | "flag": "true", |
| 499 | "n": "3", |
| 500 | } |
| 501 | |
| 502 | |
| 503 | async def test_empty_query_params_are_left_unset(send: Send, caplog: pytest.LogCaptureFixture) -> None: |