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
Hello, there is currently no way of doing response matching based on the fact that a header key does not exists.
To check this, you currently need to get the request(s) afterwards and assert that the header key is not present yourself.
This is however something I wouldn't mind adding as a feature, I would need to think of something clean to specify this as people would want to match on value being different as well.
Hi,
is there an elegant way to achieve negative match with
pytest_httpx
? For instance, verify that a header is not present in the request?A workaround might involve copying existing
add_response
and modifying it by adding custom assertions in the callback, but I don't feel good about it.The text was updated successfully, but these errors were encountered: