#!/usr/bin/env python
#
#
# Test loading of a buggy XMI file. Coral shouldn't crash
#

import coral

p = coral.loadDocument("buggy_ESMD10.xmi")

r = p.contents()[0].__getAllParts__().select(lambda x: x.__XMIid__() == "AAU:coral::ESMD10::PropertyEditor")[0]

assert len(r.properties) == 2
