Easy way to create mock Request objects for testing views
|Reported by:||simon||Owned by:||Kevin Kubasik|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The testing framework currently encourages hooking up a view function using a URLconf and then using the TestClient to run tests against the view.
It would be nice if there was an easy way to bypass URLconf entirely in testing and just create a mock object representing a GET / POST / etc request, then pass that directly to the view function.
And this snippet: http://www.djangosnippets.org/snippets/963/