Пример #1
0
 def test_actorNotSuperseded(self):
     p_actor = SdoTermSource.getTerm("actor")
     self.assertFalse(p_actor.superseded,
                      "actor property has not been superseded.")
Пример #2
0
 def test_actorSupersedesActors(self):
     p_actor = SdoTermSource.getTerm("actor")
     self.assertTrue("actors" in p_actor.supersedes,
                     "actor supersedes actors.")
Пример #3
0
 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))
Пример #4
0
 def test_GetImmediateSubtypesOk(self):
     tArticle = SdoTermSource.getTerm("Article")
     self.assertTrue("NewsArticle" in tArticle.subs,
                     "NewsArticle is in immediate subtypes of Article.")
Пример #5
0
 def test_GetImmediateSubtypesWrong(self):
     tArticle = SdoTermSource.getTerm("CreativeWork")
     self.assertFalse(
         "NewsArticle" in tArticle.subs,
         "CreativeWork is not in immediate subtypes of Article.")
Пример #6
0
 def test_QuantityisClass(self):
     tQuantity = SdoTermSource.getTerm("Quantity")
     self.assertTrue(tQuantity.termType == SdoTerm.TYPE,
                     "Quantity is a class.")
Пример #7
0
 def test_PersonNotAttribute(self):
     tPerson = SdoTermSource.getTerm("Person")
     self.assertFalse(tPerson.termType == SdoTerm.PROPERTY,
                      "Not true that Person isAttribute().")
Пример #8
0
 def test_DataTypeSupertypeDataType(self):
     tDataType = SdoTermSource.getTerm("DataType")
     self.assertFalse("DataType" in tDataType.subs,
                      "DataType subClassOf DataType.")
Пример #9
0
 def test_PersonSupertypeThing(self):
     tThing = SdoTermSource.getTerm("Thing")
     #tPerson = VTerm.getTerm("Person")
     self.assertTrue("Person" in tThing.subs, "Person subClassOf Thing.")
Пример #10
0
 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")
Пример #11
0
 def test_ThingSupertypeThing(self):
     tThing = SdoTermSource.getTerm("Thing")
     self.assertFalse("Thing" in tThing.subs, "Thing subClassOf Thing.")
Пример #12
0
 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")
Пример #13
0
 def test_EnumerationIsEnumeration(self):
     eEnumeration = SdoTermSource.getTerm("Enumeration")
     self.assertTrue(eEnumeration.termType == SdoTerm.ENUMERATION,
                     "Enumeration is an Enumeration type.")
Пример #14
0
 def test_ItemAvailabilityIsEnumeration(self):
     eItemAvailability = SdoTermSource.getTerm("ItemAvailability")
     self.assertTrue(eItemAvailability.termType == SdoTerm.ENUMERATION,
                     "ItemAvailability is an Enumeration.")
Пример #15
0
 def test_offersNotSuperseded(self):
     p_offers = SdoTermSource.getTerm("offers")
     self.assertFalse(p_offers.superseded,
                      "offers property has not been superseded.")
Пример #16
0
 def test_ThingNotSupertypePerson(self):
     #tThing = VTerm.getTerm("Thing")
     tPerson = SdoTermSource.getTerm("Person")
     self.assertFalse("Thing" in tPerson.subs,
                      "Thing not subClassOf Person.")
Пример #17
0
 def test_actorNotSupersededByOffers(self):
     p_offers = SdoTermSource.getTerm("offers")
     self.assertFalse("actor" in p_offers.supersedes,
                      "actor property doesn't supersede offers property.")
Пример #18
0
 def test_NewsArticleIsType(self):
     # node.isClass
     tNewsArticle = SdoTermSource.getTerm("NewsArticle")
     self.assertTrue(tNewsArticle.termType == SdoTerm.TYPE,
                     "NewsArticle is a class.")