aboutsummaryrefslogtreecommitdiffstats
path: root/python_moonutilities/tests/unit_python/conftest.py
blob: 7217586a9fdce2d0b3c13bce40d9c3c5f6c91524 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import pytest
import requests_mock
import mock_components
import mock_keystone
import mock_cache


@pytest.fixture(autouse=True)
def no_requests(monkeypatch):
    """ Modify the response from Requests module
    """
    with requests_mock.Mocker(real_http=True) as m:
        mock_components.register_components(m)
        mock_keystone.register_keystone(m)
        mock_cache.register_cache(m)
        print("End registering URI")
        yield m