Skip to content

Instantly share code, notes, and snippets.

@arsham
Created March 6, 2015 17:16
Show Gist options
  • Save arsham/59722d844bdf98c87bf3 to your computer and use it in GitHub Desktop.
Save arsham/59722d844bdf98c87bf3 to your computer and use it in GitHub Desktop.
Creates a django request object for test purposes
from django.test.client import RequestFactory
factory = RequestFactory()
request = factory.get('/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment