You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Order of parameters potentially matters in the API you are reaching out.
This looks however like a valid use case but I don't know when and how I will tackle this.
In the meantime, you have the 2 possible solutions:
Use a regex as matching URL (can be quite complex to read)
Use an ordered list when you send your parameters (requires to change your code for testing purpose)
As a question/feature request:
In some cases I usually convert an iterable to a
set
to avoid duplicates, like for example: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?Thanks
The text was updated successfully, but these errors were encountered: