File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 88from django import forms
99from django .conf import settings
1010from django .core .mail import EmailMessage
11- from django .test import TestCase
11+ from django .test import TestCase , override_settings
1212from django .utils import timezone
1313
1414from ..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 ()
You can’t perform that action at this time.
0 commit comments