for example I have a method in Django which reuses the request object:
def dowork(request):
# the sessionid is a query param of the callback from payment gateway
print request.GET.get('sessionid')
When I write unittest, I need to create a fake request object, which should has GET
attribute and should contains a dictionary {'sessionid': 'blah'}
How do I do that using the mock package?