mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 05:01:19 -03:30
Clear cache between tests to prevent cached settings sticking around.
This commit is contained in:
parent
6de0057c03
commit
9c2ae43ac6
@ -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():
|
||||
'''
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user