
When matching URLs both strings are always lowercased to provide case insensitive matching. Whilst this makes sense for the protocol and the host names it does not necessarily hold true for paths and query strings. A byproduct of this is that the lowercased strings are being reported in request_history which makes it harder to verify requests you made. We enable globally and per adapter setting case sensitive matching. This is intended to become the default in future releases. Change-Id: I7bde70a52995ecf31a0eaeff96f2823a1a6682b2 Closes-Bug: #1584008
18 lines
767 B
YAML
18 lines
767 B
YAML
---
|
|
prelude: >
|
|
It is now possible to make URL matching and request history not lowercase
|
|
the provided URLs.
|
|
features:
|
|
- You can pass case_sensitive=True to an adapter or set
|
|
`requests_mock.mock.case_sensitive = True` globally to enable case
|
|
sensitive matching.
|
|
upgrade:
|
|
- It is recommended you add `requests_mock.mock.case_sensitive = True` to
|
|
your base test file to globally turn on case sensitive matching as this
|
|
will become the default in a 2.X release.
|
|
fixes:
|
|
- Reported in bug \#1584008 all request matching is done in a case
|
|
insensitive way, as a byproduct of this request history is handled in a
|
|
case insensitive way. This can now be controlled by setting case_sensitive
|
|
to True when creating an adapter or globally.
|