mock django cache

2013-04-05 Thread usmani . kashif9957
In my settings.py , I have specified my cache as : CACHES = { 'default': { .. } } In my views.py, I have import requests from django.core.cache import cache, get_cache def aview(): #check cache if not get_cache('default').get('key'): #make request and save in

python mock Requests and the response

2013-04-01 Thread usmani . kashif9957
I am a beginner to using mock in python and trying to use http://www.voidspace.org.uk/python/mock. Please tell me the basic calls to get me working in below scenario. I am using python's Requests module (http://docs.python-requests.org/en/latest/) . In my views.py, I have a function that makes