I rely on my cache for my development interface. But when I run tests it distorts my cache.
I was surprised how Django creates a new database for testing, but wouldn't create a new cache, but that's a different story.
I did some research, and I learned that I should create a new dummy test cache in settings alongside my default
cache:
'test': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
And then before my test class, add @override_settings(CACHES='test')
However, I am getting an error:
django.core.cache.backends.base.InvalidCacheBackendError: The connection 'default' doesn't exist.
Note, this error is thrown from another Function that is not inside my test class, but it is in the same Django app.
Any idea how to fix this?