'Test for happy-path xqueue_callback'

def test_xqueue_callback_success(self):

    fake_key = 'fake    key'
    xqueue_header = json.dumps({'lms_key': fake_key})
    data = {'xqueue_header': xqueue_header, 'xqueue_body': 'hello    world'}
    with patch('courseware.module_render.load_single_xblock', return_value=self.mock_module):
        request = self.request_factory.post(self.callback_url, data)
        render.xqueue_callback(request, unicode(self.course_key), self.mock_user.id, self.mock_module.id, self.dispatch)
    request.POST['queuekey'] = fake_key
    self.mock_module.handle_ajax.assert_called_once_with(self.dispatch, request.POST)
