Skip to content

Commit

Permalink
Add a docstring to the pytest fixture
Browse files Browse the repository at this point in the history
When you run py.test --fixtures there's an error saying that there's no
docstring on our fixture. We can add one of those.
  • Loading branch information
Jamie Lennox authored and jamielennox committed Jul 21, 2018
1 parent acce624 commit e6f4319
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions requests_mock/contrib/_pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ def pytest_addoption(parser):

@_fixture_type(scope='function') # executed on every test
def requests_mock(request):
"""Mock out the requests component of your code with defined responses.
Mocks out any requests made through the python requests library with useful
responses for unit testing. See:
https://requests-mock.readthedocs.io/en/latest/
"""
case_sensitive = request.config.getini('requests_mock_case_sensitive')
kw = {'case_sensitive': _bool_value(case_sensitive)}

Expand Down

0 comments on commit e6f4319

Please sign in to comment.