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