Skip to content

Commit 51b12a4

Browse files
committed
fix test
1 parent ac1d365 commit 51b12a4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sponsors/tests/test_models.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from django import forms
99
from django.conf import settings
1010
from django.core.mail import EmailMessage
11-
from django.test import TestCase
11+
from django.test import TestCase, override_settings
1212
from django.utils import timezone
1313

1414
from ..models import (
@@ -327,6 +327,12 @@ def test_singleton_object_cannot_be_deleted(self):
327327

328328
self.assertIn("Singleton object cannot be delete. Try updating it instead.", str(context.exception))
329329

330+
@override_settings(CACHES={
331+
"default": {
332+
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
333+
"LOCATION": "pythondotorg-local-cache",
334+
}
335+
})
330336
def test_current_year_is_cached(self):
331337
# cleans cached from previous test runs
332338
cache.clear()

0 commit comments

Comments
 (0)