Closed Bug 1297684 Opened 9 years ago Closed 9 years ago

Force LocMemCache cache in tests

Categories

(Socorro :: Webapp, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Assigned: peterbe)

Details

Attachments

(1 file)

Before we used python-decouple to do settings, we used test-utils which had the trick of always loading the contents of a `test_settings.py` file last. Problem was that if you had memcache in settings/base.py it didn't matter if test_settings.py set `CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}` because of how Django loads things. So we had to rely on documenting (but failing) and telling people to set their local caching to be LocMemCache. Now we have a crashstats/settings/test.py file and this will be loaded before django configures the cache backend.
Summary: Force LocMem cache in tests → Force LocMemCache cache in tests
Commit pushed to master at https://github.com/mozilla/socorro https://github.com/mozilla/socorro/commit/b32cec5385f83f4d86599963f2476d73c9d6ef27 fixes bug 1297684 - force LocMemCache in tests (#3442) * fixes bug 1297684 - force LocMemCache in tests * pyflakes fix
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: