'Assert that OLX properties (parent and child references) are satisfied.'

def assertOLXProperties(self, element, block_type, course_key, draft, **kwargs):

    child_types_ids = kwargs.pop('child_ids', None)
    filename = kwargs.pop('filename', None)
    self.assertElementTag(element, block_type)
    if (block_type == 'html'):
        self.assertElementAttrsSubset(element, {'filename': filename})
    elif draft:
        self.assertParentReferences(element, course_key, **kwargs)
    child_id_regex = None
    child_type = None
    if child_types_ids:
        child_type = child_types_ids[0][0]
        child_id_regex = '|'.join([child[1] for child in child_types_ids])
    for child in element:
        self.assertElementTag(child, child_type)
        self.assertElementAttrsSubset(child, {'url_name': child_id_regex})
