Beispiel #1
0
 def test_same(self):
     # makes sure that the same XSD produces the same hash
     file = open('composition.xsd', 'r')
     content = file.read()
     hash = XSDhash.get_hash(content)
     print "self.hash: " + self.hash
     print "hash: " + hash
     self.assertEqual(self.hash, hash)
Beispiel #2
0
 def test_wrong_enum(self):
     # makes sure that an XSD with different enumeration does not produce the same hash
     file = open('wrong-enum.xsd', 'r')
     content = file.read()
     hash = XSDhash.get_hash(content)
     print "self.hash: " + self.hash
     print "hash: " + hash
     self.assertNotEqual(self.hash, hash)
Beispiel #3
0
 def test_different_annotations_levels(self):
     # makes sure that an XSD with different comments produces the same hash
     file = open('annotations-levels.xsd', 'r')
     content = file.read()
     hash = XSDhash.get_hash(content)
     print "self.hash: " + self.hash
     print "hash: " + hash
     self.assertEqual(self.hash, hash)
Beispiel #4
0
 def test_different_namespace(self):
     # makes sure that an XSD with different comments produces the same hash
     file = open('namespace.xsd', 'r')
     content = file.read()
     hash = XSDhash.get_hash(content)
     print "self.hash: " + self.hash
     print "hash: " + hash
     self.assertNotEqual(self.hash, hash)
Beispiel #5
0
 def test_comments(self):
     # makes sure that an XSD with documentation tags produces different hash
     file = open('different-comments.xsd', 'r')
     content = file.read()
     hash = XSDhash.get_hash(content)
     print "self.hash: " + self.hash
     print "hash: " + hash
     self.assertEqual(self.hash, hash)
Beispiel #6
0
 def test_spaces2(self):
     # makes sure that an XSD with additional spaces, returns,tabs produces the same hash
     file = open('spaces-return-tab.xsd', 'r')
     content = file.read()
     hash = XSDhash.get_hash(content)
     print "self.hash: " + self.hash
     print "hash: " + hash
     self.assertEqual(self.hash, hash)
Beispiel #7
0
 def test_order(self):
     # makes sure that an XSD with elements in a different order produces the same hash
     file = open('order2.xsd', 'r')
     content = file.read()
     hash = XSDhash.get_hash(content)
     print "self.hash: " + self.hash
     print "hash: " + hash
     self.assertEqual(self.hash, hash)
Beispiel #8
0
 def test_type(self):
     # makes sure that an XSD with different type names does not produce the same hash
     file = open('type-name.xsd', 'r')
     content = file.read()
     hash = XSDhash.get_hash(content)
     print "self.hash: " + self.hash
     print "hash: " + hash
     self.assertNotEqual(self.hash, hash)
Beispiel #9
0
 def setUp(self):
     print "In method", self._testMethodName
     file = open('composition.xsd', 'r')
     self.content = file.read()
     self.hash = XSDhash.get_hash(self.content)
Beispiel #10
0
 def setUp(self):
     print "In method", self._testMethodName
     file = open('chemical-element.xsd', 'r')
     self.content = file.read()
     self.hash = XSDhash.get_hash(self.content)