예제 #1
0
파일: run_tests.py 프로젝트: foaf/foaftown
 def test_label_for_foaf_workplaceHomepage(self):
   """check we can get the label for foaf's workplaceHomepage property"""
   foaf_spec = Vocab(dir=FOAFSNAPSHOTDIR, f=FOAFSNAPSHOT,uri='http://xmlns.com/foaf/0.1/')
   foaf_spec.index()
   l = foaf_spec.lookup('http://xmlns.com/foaf/0.1/workplaceHomepage').label
   # print "Label for foaf workplaceHomepage is "+l
   self.assertEqual(l,"workplace homepage")
예제 #2
0
파일: run_tests.py 프로젝트: foaf/foaftown
 def test_label_for_foaf_Person(self):
   """check we can get the label for foaf's Person class"""
   foaf_spec = Vocab(dir=FOAFSNAPSHOTDIR,f=FOAFSNAPSHOT, uri='http://xmlns.com/foaf/0.1/')
   foaf_spec.index()
   l = foaf_spec.lookup('http://xmlns.com/foaf/0.1/Person').label
   # print "Label for foaf Person is "+l
   self.assertEqual(l,"Person")
예제 #3
0
파일: run_tests.py 프로젝트: foaf/foaftown
 def test_lookup_Person(self):
   """find a term given it's uri"""
   foaf_spec = Vocab(dir=FOAFSNAPSHOTDIR,f=FOAFSNAPSHOT, uri='http://xmlns.com/foaf/0.1/') 
   foaf_spec.index()
   p = foaf_spec.lookup('http://xmlns.com/foaf/0.1/Person')
   # print "lookup for Person: ",p
   self.assertNotEqual(p.uri,  None, "Couldn't find person class in FOAF")
예제 #4
0
 def test_status_for_foaf_Person(self):
     """check we can get the status for foaf's Person class"""
     foaf_spec = Vocab(dir=FOAFSNAPSHOTDIR,
                       f=FOAFSNAPSHOT,
                       uri='http://xmlns.com/foaf/0.1/')
     foaf_spec.index()
     s = foaf_spec.lookup('http://xmlns.com/foaf/0.1/Person').status
     self.assertEqual(s, "stable")
예제 #5
0
 def test_label_for_foaf_Person(self):
     """check we can get the label for foaf's Person class"""
     foaf_spec = Vocab(dir=FOAFSNAPSHOTDIR,
                       f=FOAFSNAPSHOT,
                       uri='http://xmlns.com/foaf/0.1/')
     foaf_spec.index()
     l = foaf_spec.lookup('http://xmlns.com/foaf/0.1/Person').label
     # print "Label for foaf Person is "+l
     self.assertEqual(l, "Person")
예제 #6
0
 def test_lookup_Wombat(self):
     """fail to a bogus term given it's uri"""
     foaf_spec = Vocab(dir=FOAFSNAPSHOTDIR,
                       f=FOAFSNAPSHOT,
                       uri='http://xmlns.com/foaf/0.1/')
     foaf_spec.index()
     p = foaf_spec.lookup(
         'http://xmlns.com/foaf/0.1/Wombat')  # No Wombats in FOAF yet.
     self.assertEqual(p, None, "lookup for Wombat should return None")
예제 #7
0
 def test_lookup_Person(self):
     """find a term given it's uri"""
     foaf_spec = Vocab(dir=FOAFSNAPSHOTDIR,
                       f=FOAFSNAPSHOT,
                       uri='http://xmlns.com/foaf/0.1/')
     foaf_spec.index()
     p = foaf_spec.lookup('http://xmlns.com/foaf/0.1/Person')
     # print "lookup for Person: ",p
     self.assertNotEqual(p.uri, None, "Couldn't find person class in FOAF")
예제 #8
0
 def test_status_for_doap_Repository(self):
     """check we can get the computed 'unknown' status for doap's Repository class"""
     doap_spec = Vocab(dir=DOAPSNAPSHOTDIR,
                       f=DOAPSNAPSHOT,
                       uri='http://usefulinc.com/ns/doap#')
     doap_spec.index()
     s = doap_spec.lookup('http://usefulinc.com/ns/doap#Repository').status
     self.assertEqual(
         s, "unknown",
         "if vs:term_status isn't used, we set t.status to 'unknown'")
예제 #9
0
 def test_label_for_foaf_workplaceHomepage(self):
     """check we can get the label for foaf's workplaceHomepage property"""
     foaf_spec = Vocab(dir=FOAFSNAPSHOTDIR,
                       f=FOAFSNAPSHOT,
                       uri='http://xmlns.com/foaf/0.1/')
     foaf_spec.index()
     l = foaf_spec.lookup(
         'http://xmlns.com/foaf/0.1/workplaceHomepage').label
     # print "Label for foaf workplaceHomepage is "+l
     self.assertEqual(l, "workplace homepage")
예제 #10
0
 def test_got_sioc(self):
     sioc_spec = Vocab(SIOCSNAPSHOTDIR, SIOCSNAPSHOT, uri=SIOC)
     sioc_spec.index()
     cr = sioc_spec.lookup('http://rdfs.org/sioc/ns#creator_of')
예제 #11
0
 def test_label_for_sioc_Community(self):
     """check we can get the label for sioc's Community class"""
     sioc_spec = Vocab(dir=SIOCSNAPSHOTDIR, f=SIOCSNAPSHOT, uri=SIOC)
     sioc_spec.index()
     l = sioc_spec.lookup(SIOC + 'Community').label
     self.assertEqual(l, "Community")
예제 #12
0
파일: run_tests.py 프로젝트: foaf/foaftown
 def test_got_sioc(self):
   sioc_spec = Vocab(SIOCSNAPSHOTDIR,SIOCSNAPSHOT, uri = SIOC)
   sioc_spec.index()
   cr =  sioc_spec.lookup('http://rdfs.org/sioc/ns#creator_of')
예제 #13
0
파일: run_tests.py 프로젝트: foaf/foaftown
 def test_status_for_doap_Repository(self):
   """check we can get the computed 'unknown' status for doap's Repository class"""
   doap_spec = Vocab(dir=DOAPSNAPSHOTDIR,f=DOAPSNAPSHOT, uri='http://usefulinc.com/ns/doap#')
   doap_spec.index()
   s = doap_spec.lookup('http://usefulinc.com/ns/doap#Repository').status
   self.assertEqual(s,"unknown", "if vs:term_status isn't used, we set t.status to 'unknown'")
예제 #14
0
파일: run_tests.py 프로젝트: foaf/foaftown
 def test_status_for_foaf_Person(self):
   """check we can get the status for foaf's Person class"""
   foaf_spec = Vocab(dir=FOAFSNAPSHOTDIR,f=FOAFSNAPSHOT, uri='http://xmlns.com/foaf/0.1/')
   foaf_spec.index()
   s = foaf_spec.lookup('http://xmlns.com/foaf/0.1/Person').status
   self.assertEqual(s,"stable")
예제 #15
0
파일: run_tests.py 프로젝트: foaf/foaftown
 def test_label_for_sioc_Community(self):
   """check we can get the label for sioc's Community class"""
   sioc_spec = Vocab(dir=SIOCSNAPSHOTDIR,f=SIOCSNAPSHOT, uri=SIOC)
   sioc_spec.index()
   l = sioc_spec.lookup(SIOC+'Community').label
   self.assertEqual(l,"Community")
예제 #16
0
파일: run_tests.py 프로젝트: foaf/foaftown
 def test_lookup_Wombat(self):
   """fail to a bogus term given it's uri"""
   foaf_spec = Vocab(dir=FOAFSNAPSHOTDIR,f=FOAFSNAPSHOT, uri='http://xmlns.com/foaf/0.1/') 
   foaf_spec.index()
   p = foaf_spec.lookup('http://xmlns.com/foaf/0.1/Wombat') # No Wombats in FOAF yet.
   self.assertEqual(p,  None, "lookup for Wombat should return None")