aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4/python_moonclient/tests/unit_python/conftest.py
diff options
context:
space:
mode:
authorRHE <rebirthmonkey@gmail.com>2017-12-21 10:06:52 +0100
committerThomas Duval <thomas.duval@orange.com>2017-12-21 10:33:15 +0100
commit8b326a5aeb0f9655ff0ebfe0d87ff1ea8f66bc38 (patch)
tree16f319475de8f256914e18a6be0183b48ccc692a /moonv4/python_moonclient/tests/unit_python/conftest.py
parenta7f99c33c0b2b2c617dd044e658a263ae910b53a (diff)
python_moonclient init
Change-Id: Iaf104b3208a07dc80cc266830be444d019b0f196 Signed-off-by: RHE <rebirthmonkey@gmail.com>
Diffstat (limited to 'moonv4/python_moonclient/tests/unit_python/conftest.py')
-rw-r--r--moonv4/python_moonclient/tests/unit_python/conftest.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/moonv4/python_moonclient/tests/unit_python/conftest.py b/moonv4/python_moonclient/tests/unit_python/conftest.py
new file mode 100644
index 00000000..d26df946
--- /dev/null
+++ b/moonv4/python_moonclient/tests/unit_python/conftest.py
@@ -0,0 +1,12 @@
+import pytest
+import requests_mock
+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