'Assert that the supplied element references the supplied parents.
Arguments:
element: The element to check.
course_key: The course the element is from.
parent_type: The block_type of the expected parent node.
parent_id: The block_id of the expected parent node.
index_in_children_list: The expected index in the parent.'

def assertParentReferences(self, element, course_key, parent_type, parent_id, index_in_children_list):

    parent_key = course_key.make_usage_key(parent_type, parent_id)
    self.assertElementAttrsSubset(element, {'parent_url': re.escape(unicode(parent_key)), 'index_in_children_list': re.escape(str(index_in_children_list))})
