Skip to content

Commit

Permalink
pytest plugin should lazy-load requests_mock
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonst authored and jamielennox committed Apr 19, 2022
1 parent 73f5cb2 commit bf7273d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion requests_mock/contrib/_pytest_plugin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
import requests_mock as rm_module


# RHEL 7 ships pytest 2.7 which doesn't have the 'bool' type to addini. This
Expand Down Expand Up @@ -76,6 +75,8 @@ def requests_mock(request):
responses for unit testing. See:
https://requests-mock.readthedocs.io/en/latest/
"""
import requests_mock as rm_module

case_sensitive = request.config.getini('requests_mock_case_sensitive')
kw = {'case_sensitive': _bool_value(case_sensitive)}

Expand Down

0 comments on commit bf7273d

Please sign in to comment.