'Fake a request with an user'

def _get_request_with_user(self, user):

    request = HttpRequest()
    request.META = {'SERVER_NAME': 'testserver', 'SERVER_PORT': 80}
    request.method = 'GET'
    request.session = {}
    request.user = user
    return request
