'Helper method to send move request and returns the response.
Arguments:
source_usage_key (BlockUsageLocator): Locator of source item.
target_usage_key (BlockUsageLocator): Locator of target parent.
target_index (int): If provided, insert source item at the provided index location in target_usage_key item.
Returns:
resp (JsonResponse): Response after the move operation is complete.'

def _move_component(self, source_usage_key, target_usage_key, target_index=None):

    data = {'move_source_locator': unicode(source_usage_key), 'parent_locator': unicode(target_usage_key)}
    if (target_index is not None):
        data['target_index'] = target_index
    return self.client.patch(reverse('contentstore.views.xblock_handler'), json.dumps(data), content_type='application/json')
