djangosnippets.org: Latest snippets tagged with 'testcase'https://djangosnippets.org/tags/testcase/2010-10-07T17:21:44.816144-05:00Modify requests in your unit tests (improvement on RequestFactory)
2010-10-07T17:21:44.816144-05:00vaughnkochhttps://djangosnippets.org/snippets/2231/<p>This is an update to Simon Willison's snippet http://djangosnippets.org/snippets/963/, along with one of the comments in that snippet.<br />
</p>
<p>This class lets you create a Request object that's gone through all the middleware. Suitable for unit testing when you need to modify something on the request directly, or pass in a …</p>
Freely redistributable