Created
January 3, 2012 11:45
-
-
Save wil/1554608 to your computer and use it in GitHub Desktop.
Fake django request useful for calling a view function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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