requests-mock/doc/source/knownissues.rst
Jamie Lennox 9fbd45b35f Fix docs building
As part of review [1] the openstack build system assumes the layout of
the docs directories to be doc/build. This is not what requests-mock was
producing. Fix the docs building directories to make it work with the
build system again.

[1] Icb0c02dc5b6f7b5e248e0df6d6093c29535b08f3

Closes-Bug: #1630114
Change-Id: Iea93ecfb0506d5ccd0b79ad35f5677797fadf730
2016-10-04 16:34:16 +11:00

958 B

Known Issues

Case Insensitivity

By default matching is done in a completely case insensitive way. This makes sense for the protocol and host components which are defined as insensitive by RFCs however it does not make sense for path.

A byproduct of this is that when using request history the values for path, qs etc are all lowercased as this was what was used to do the matching.

To work around this when building an Adapter or Mocker you do

with requests_mock.mock(case_sensitive=True) as m:
   ...

or you can override the default globally by

requests_mock.mock.case_sensitive = True

It is recommended to run the global fix as it is intended that case sensitivity will become the default in future releases.

Note that even with case_sensitive enabled the protocol and netloc of a mock are still matched in a case insensitive way.