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
I quite recently ran in to a typo which respx doesn't pick up on. It's probably not really respxs responsibility but thought perhaps it could deserve a warning? Or even better if it'd raise an error.
This seems to be caused by the http method helper API, i.e. the .post(...) auto-adds the method pattern, and "collides" with the AND'ed predefined route's method__in pattern.
IMO a warning would be enough here, fired by the helper API. Let's start with that and maybe bump that to an exception in the future.
I changed my mind 😉, it makes more sense to raise TypeError in this case.
Calling .post("https://foo.bar/", url="https://example.org/") would already fire a TypeError by python, due to the argument name colliding. So validating the lookups and fail likewise aligns better.
I quite recently ran in to a typo which
respx
doesn't pick up on. It's probably not reallyrespx
s responsibility but thought perhaps it could deserve a warning? Or even better if it'd raise an error.Raises:
Choosing any of the methods
POST
,GET
orPUT
. The same error is raised since there's really nothing that could possibly match more than 1 method.This is the constraint on the route:
The text was updated successfully, but these errors were encountered: