Skip to content

Instantly share code, notes, and snippets.

@wil
Created January 3, 2012 11:45
Show Gist options
  • Save wil/1554608 to your computer and use it in GitHub Desktop.
Save wil/1554608 to your computer and use it in GitHub Desktop.
Fake django request useful for calling a view function
from django.http import QueryDict
class FakeRequest(object):
pass
request = FakeRequest()
request.GET = QueryDict('a=1&b=2')
request.META = {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment