import pytest

from fmn.rules.cache import cache


@pytest.fixture(autouse=True, scope="session")
def configured_cache():
    cache.configure()

import pytest

from fmn.rules.cache import cache


@pytest.fixture(autouse=True)
def configured_cache():
    if not cache.region.is_configured:
        cache.configure()
    yield
    cache.region.invalidate()

Fix intermittent failures of test_guard_http_exception