def test_actorNotSuperseded(self): p_actor = SdoTermSource.getTerm("actor") self.assertFalse(p_actor.superseded, "actor property has not been superseded.")
def test_actorSupersedesActors(self): p_actor = SdoTermSource.getTerm("actor") self.assertTrue("actors" in p_actor.supersedes, "actor supersedes actors.")
def test_actorsSuperseded(self): p_actors = SdoTermSource.getTerm("actors") self.assertTrue( p_actors.superseded, "actors property has been superseded.%s %s" % (p_actors.superseded, p_actors.supersededBy))
def test_GetImmediateSubtypesOk(self): tArticle = SdoTermSource.getTerm("Article") self.assertTrue("NewsArticle" in tArticle.subs, "NewsArticle is in immediate subtypes of Article.")
def test_GetImmediateSubtypesWrong(self): tArticle = SdoTermSource.getTerm("CreativeWork") self.assertFalse( "NewsArticle" in tArticle.subs, "CreativeWork is not in immediate subtypes of Article.")
def test_QuantityisClass(self): tQuantity = SdoTermSource.getTerm("Quantity") self.assertTrue(tQuantity.termType == SdoTerm.TYPE, "Quantity is a class.")
def test_PersonNotAttribute(self): tPerson = SdoTermSource.getTerm("Person") self.assertFalse(tPerson.termType == SdoTerm.PROPERTY, "Not true that Person isAttribute().")
def test_DataTypeSupertypeDataType(self): tDataType = SdoTermSource.getTerm("DataType") self.assertFalse("DataType" in tDataType.subs, "DataType subClassOf DataType.")
def test_PersonSupertypeThing(self): tThing = SdoTermSource.getTerm("Thing") #tPerson = VTerm.getTerm("Person") self.assertTrue("Person" in tThing.subs, "Person subClassOf Thing.")
def test_NewsArticleSupertypeArticle(self): tNewsArticle = SdoTermSource.getTerm("NewsArticle") #tArticle = SdoTermSource.getTerm("Article") self.assertFalse("Article" in tNewsArticle.subs, "Article is not a sub-type of NewsArticle")
def test_ThingSupertypeThing(self): tThing = SdoTermSource.getTerm("Thing") self.assertFalse("Thing" in tThing.subs, "Thing subClassOf Thing.")
def test_ArticleSupertypeNewsArticle(self): #tNewsArticle = SdoTermSource.getTerm("NewsArticle") tArticle = SdoTermSource.getTerm("Article") self.assertTrue("NewsArticle" in tArticle.subs, "NewsArticle is a sub-type of Article")
def test_EnumerationIsEnumeration(self): eEnumeration = SdoTermSource.getTerm("Enumeration") self.assertTrue(eEnumeration.termType == SdoTerm.ENUMERATION, "Enumeration is an Enumeration type.")
def test_ItemAvailabilityIsEnumeration(self): eItemAvailability = SdoTermSource.getTerm("ItemAvailability") self.assertTrue(eItemAvailability.termType == SdoTerm.ENUMERATION, "ItemAvailability is an Enumeration.")
def test_offersNotSuperseded(self): p_offers = SdoTermSource.getTerm("offers") self.assertFalse(p_offers.superseded, "offers property has not been superseded.")
def test_ThingNotSupertypePerson(self): #tThing = VTerm.getTerm("Thing") tPerson = SdoTermSource.getTerm("Person") self.assertFalse("Thing" in tPerson.subs, "Thing not subClassOf Person.")
def test_actorNotSupersededByOffers(self): p_offers = SdoTermSource.getTerm("offers") self.assertFalse("actor" in p_offers.supersedes, "actor property doesn't supersede offers property.")
def test_NewsArticleIsType(self): # node.isClass tNewsArticle = SdoTermSource.getTerm("NewsArticle") self.assertTrue(tNewsArticle.termType == SdoTerm.TYPE, "NewsArticle is a class.")