'Test that a content experiment can not be moved inside any of it\'s children.'

def test_can_not_move_content_experiment_into_its_children(self):

    split_test = self.setup_and_verify_content_experiment(0)
    for child_vert_usage_key in split_test.children:
        response = self._move_component(self.split_test_usage_key, child_vert_usage_key)
        self.assertEqual(response.status_code, 400)
        response = json.loads(response.content)
        self.assertEqual(response['error'], "You    can    not    move    an    item    into    it's    child.")
        self.assertEqual(self.store.get_parent_location(self.split_test_usage_key), self.vert_usage_key)
    resp = self.create_xblock(category='split_test', parent_usage_key=split_test.children[0])
    child_split_test_usage_key = self.response_usage_key(resp)
    self.client.ajax_post(reverse_usage_url('xblock_handler', child_split_test_usage_key), data={'metadata': {'user_partition_id': str(0)}})
    child_split_test = self.get_item_from_modulestore(self.split_test_usage_key, verify_is_draft=True)
    response = self._move_component(self.split_test_usage_key, child_split_test.children[0])
    self.assertEqual(response.status_code, 400)
    response = json.loads(response.content)
    self.assertEqual(response['error'], "You    can    not    move    an    item    into    it's    child.")
    self.assertEqual(self.store.get_parent_location(self.split_test_usage_key), self.vert_usage_key)
