Exemplo n.º 1
0
 def test_unknown_schemalocation(self):
     """This test case will attempt to retreive a URL that is known not to 
     exist in SchemaWeb. 
     
     The expected result should be the original submission indicating that
     we should just try the public ID.
     
     """
     tests = [
         'http://iambogus.com/rdf/',
         'http://totallybogus.info/rdf/',
         'http://iamabogusurl.org/rdf/#',
     ]
     for test in tests:
         self.assertEqual(schemalocation(test), test)
Exemplo n.º 2
0
 def test_unknown_schemalocation(self):
     """This test case will attempt to retreive a URL that is known not to 
     exist in SchemaWeb. 
     
     The expected result should be the original submission indicating that
     we should just try the public ID.
     
     """
     tests = [
         'http://iambogus.com/rdf/',
         'http://totallybogus.info/rdf/',
         'http://iamabogusurl.org/rdf/#',
         ]
     for test in tests:
         self.assertEqual(schemalocation(test), test)
Exemplo n.º 3
0
 def test_schemalocation(self):
     """Test using schemalocation to resolve public namespace ID's to real
     URI locations.
     
     """
     tests = [
         ('http://www.w3.org/2000/01/rdf-schema#',
          'http://www.w3.org/TR/rdf-schema/rdfs-namespace.xml'),
         ('http://www.w3.org/2002/07/owl#',
          'http://www.w3.org/2002/07/owl.rdf'),
         ('http://xmlns.com/foaf/0.1/',
          'http://xmlns.com/foaf/0.1/index.rdf'),
         ('http://xmlns.com/wot/0.1/',
          'http://xmlns.com/wot/0.1/index.rdf'),
     ]
     for pub, real in tests:
         self.assertEqual(schemalocation(pub), real)
Exemplo n.º 4
0
 def test_schemalocation(self):
     """Test using schemalocation to resolve public namespace ID's to real
     URI locations.
     
     """
     tests = [
         ('http://www.w3.org/2000/01/rdf-schema#', 
             'http://www.w3.org/TR/rdf-schema/rdfs-namespace.xml'),
         ('http://www.w3.org/2002/07/owl#', 
             'http://www.w3.org/2002/07/owl.rdf'),
         ('http://xmlns.com/foaf/0.1/', 
             'http://xmlns.com/foaf/0.1/index.rdf'),
         ('http://xmlns.com/wot/0.1/', 
             'http://xmlns.com/wot/0.1/index.rdf'),
         ]
     for pub, real in tests:
         self.assertEqual(schemalocation(pub), real)