'Generate request that can be used for submitting tasks'

def create_task_request(self, requester_username):

    request = Mock()
    request.user = User.objects.get(username=requester_username)
    request.get_host = Mock(return_value='testhost')
    request.META = {'REMOTE_ADDR': '0:0:0:0', 'SERVER_NAME': 'testhost'}
    request.is_secure = Mock(return_value=False)
    return request
