diff --git a/awx/main/tests/functional/conftest.py b/awx/main/tests/functional/conftest.py index 115ada29fd..6055154136 100644 --- a/awx/main/tests/functional/conftest.py +++ b/awx/main/tests/functional/conftest.py @@ -9,6 +9,7 @@ from datetime import timedelta # Django from django.core.urlresolvers import resolve +from django.core.cache import cache from django.utils.six.moves.urllib.parse import urlparse from django.utils import timezone from django.contrib.auth.models import User @@ -47,6 +48,14 @@ from awx.main.models.notifications import ( ) +@pytest.fixture(autouse=True) +def clear_cache(): + ''' + Clear cache (local memory) for each test to prevent using cached settings. + ''' + cache.clear() + + @pytest.fixture(scope="session", autouse=False) def disable_signals(): '''