As a question/feature request:
In some cases I usually convert an iterable to a set to avoid duplicates, like for example:
response = httpx.AsyncClient().get(
"http://localhost:1111/videos",
params={
"field": list(set([1, 2, 2]))
}
)
Which is difficult to test with pytest_httpx since the order of the query parameter field isn't known and doesn't really matter.
Is it possible to add new argument to HTTPXMock.add_response to ignore query param order if the same parameter is provided more than once?
# **Suggestion 1**
httpx_mock.add_response(
method="GET",
url="http://localhost:1111/videos?field=1&field=2",
status_code=200,
ignore_query_param_value_order=True,
)
# **Suggestion 2**
httpx_mock.add_response(
method="GET",
url="http://localhost:1111/videos?field=1&field=2",
status_code=200,
ignore_query_param_value_order=["field"],
)
Thanks