#!/usr/bin/env python
import coral

L = coral.lang.UML14

m = L.Model()

c = L.Class()

c.namespace = m

assert(len(m.ownedElement) == 1)
assert(m.ownedElement[0] == c)
assert(c.namespace == m)

m.ownedElement.drop_index(0)

assert(len(m.ownedElement) == 0)
assert(c.namespace is None)

