MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / test_query_params

Function test_query_params

tests/test_prepare.py:490–500  ·  view source on GitHub ↗
(send: Send)

Source from the content-addressed store, hash-verified

488
489
490async 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
503async def test_empty_query_params_are_left_unset(send: Send, caplog: pytest.LogCaptureFixture) -> None:

Callers

nothing calls this directly

Calls 1

queryMethod · 0.80

Tested by

no test coverage detected