@pytest.fixture
def metrics_mock():
    '\n    Overrides the prometheus metric registry and allows to verify if the desired\n    prometheus metrics were correctly recorded.\n    '
    from unittest import mock
    from prometheus_client import CollectorRegistry
    with mock.patch('rucio.core.monitor.REGISTRY', new=CollectorRegistry()) as registry, mock.patch('rucio.core.monitor.COUNTERS', new={}):
        (yield registry)
Overrides the prometheus metric registry and allows to verify if the desired
prometheus metrics were correctly recorded.
@pytest.fixture
def metrics_mock():
    '\n    Overrides the prometheus metric registry and allows to verify if the desired\n    prometheus metrics were correctly recorded.\n    '
    from unittest import mock
    from prometheus_client import CollectorRegistry
    with mock.patch('rucio.core.monitor.REGISTRY', new=CollectorRegistry()) as registry, mock.patch('rucio.core.monitor.COUNTERS', new={}):
        (yield registry)