def _prepare_request(self, url, user):
request = RequestFactory().get(url)<EOL>request.user = user<EOL>session_key = request.COOKIES.get(settings.SESSION_COOKIE_NAME)<EOL>request.session = self.session_engine.SessionStore(session_key)<EOL>return request<EOL>
Prepare request for test.