Skip to content

Instantly share code, notes, and snippets.

View rahuladream's full-sized avatar
🏁
Towards Goal

Rahul Singh rahuladream

🏁
Towards Goal
View GitHub Profile
@igniteflow
igniteflow / mock-django-cache.py
Created July 6, 2015 12:57
Mock Django's cache in unit tests
"""
myapp/mymodule.py:
from django.core.cache import cache
def set_cache():
cache.set('foo', 'bar')
def get_cache():
return cache.get('foo')