diff --git a/docs/fixture.rst b/docs/fixture.rst index a510abf..e7d5420 100644 --- a/docs/fixture.rst +++ b/docs/fixture.rst @@ -4,8 +4,12 @@ Fixtures `Fixtures`_ provide a way to create reusable state and helper methods in test cases. -To use the *requests-mock* fixture your tests need to have a dependency on the `fixtures`_ library and the `mock`_ library. -These are not provided by *requests-mock*. +To use the *requests-mock* fixture your tests need to have a dependency on the `fixtures`_ library. +This can be optionally installed when you install *requests-mock* by doing: + +.. code:: shell + + pip install requests-mock[fixture] The fixture mocks the :py:meth:`requests.Session.get_adapter` method so that all requests will be served by the mock adapter. diff --git a/releasenotes/notes/fixture-extras-699a5b5fb5bd6aab.yaml b/releasenotes/notes/fixture-extras-699a5b5fb5bd6aab.yaml new file mode 100644 index 0000000..33af9dc --- /dev/null +++ b/releasenotes/notes/fixture-extras-699a5b5fb5bd6aab.yaml @@ -0,0 +1,7 @@ +--- +prelude: > + Installing the requirements for the 'fixture' contrib package can now be + done via pip with `pip install requests-mock[fixture]` +features: + Added 'fixture' to pip extras so you can install the fixture requirements + with `pip install requests-mock[fixture]` diff --git a/setup.cfg b/setup.cfg index c1f9a27..349021d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,3 +26,7 @@ packages = requests_mock [wheel] universal = 1 + +[extras] +fixture = + fixtures