Fix caching problems in unit tests

This commit is contained in:
Raphael Michel
2016-11-08 16:20:03 +01:00
parent 6adcf4bc7c
commit 4c80ec17bf
3 changed files with 27 additions and 3 deletions

View File

@@ -1,12 +1,18 @@
import random
from django.core.cache import cache as django_cache
from django.test import TestCase
from django.test import TestCase, override_settings
from django.utils.timezone import now
from pretix.base.models import Event, Organizer
@override_settings(CACHES={
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
}
})
class CacheTest(TestCase):
"""
This test case tests the invalidation of the event related