aboutsummaryrefslogtreecommitdiffstats
path: root/python_moonclient/tests/unit_python/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'python_moonclient/tests/unit_python/conftest.py')
-rw-r--r--python_moonclient/tests/unit_python/conftest.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/python_moonclient/tests/unit_python/conftest.py b/python_moonclient/tests/unit_python/conftest.py
new file mode 100644
index 00000000..e98f48c5
--- /dev/null
+++ b/python_moonclient/tests/unit_python/conftest.py
@@ -0,0 +1,12 @@
+import pytest
+import requests_mock
+from . import mock_config
+
+
+@pytest.fixture(autouse=True)
+def no_requests(monkeypatch):
+ """ Modify the response from Requests module
+ """
+ with requests_mock.Mocker(real_http=True) as m:
+ mock_config.register_consul(m)
+ yield m