for r in t.findall('rolePlayed'):
assert role_refs[r.attrib['ref']] == t.attrib['number']
assert sum(len(t.findall('rolePlayed')) for t in topics) == len(role_refs)
for ref in xml.iter():
if 'topicref' in ref.attrib:
assert 1 <= int(ref.attrib['topicref']) <= len(topics)
for r in t.findall('rolePlayed'):
assert role_refs[r.attrib['ref']] == t.attrib['number']
assert sum(len(t.findall('rolePlayed')) for t in topics) == len(role_refs)
for ref in xml.iter():
if 'topicref' in ref.attrib:
assert 1 <= int(ref.attrib['topicref']) <= len(topics)