示例#1
0
 def test_remove_file(self):
     manifest = Manifest(testdata)
     result = manifest.find('/')
     self.assertIsNotNone(result)
     manifest.remove('/')
     result = manifest.find('/')
     self.assertIsNone(result)
示例#2
0
 def test_query_file(self):
     XML = '{urn:oasis:names:tc:opendocument:xmlns:manifest:1.0}'
     manifest = Manifest(testdata)
     rootfile = manifest.find('/')
     self.assertEqual('application/vnd.oasis.opendocument.text', rootfile.get(XML+'media-type'))
     rdf = manifest.find('manifest.rdf')
     self.assertEqual('application/rdf+xml', rdf.get(XML+'media-type'))
示例#3
0
 def test_remove_file(self):
     manifest = Manifest(testdata)
     result = manifest.find('/')
     self.assertIsNotNone(result)
     manifest.remove('/')
     result = manifest.find('/')
     self.assertIsNone(result)
示例#4
0
 def test_query_file(self):
     XML = '{urn:oasis:names:tc:opendocument:xmlns:manifest:1.0}'
     manifest = Manifest(testdata)
     rootfile = manifest.find('/')
     self.assertEqual('application/vnd.oasis.opendocument.text', rootfile.get(XML+'media-type'))
     rdf = manifest.find('manifest.rdf')
     self.assertEqual('application/rdf+xml', rdf.get(XML+'media-type'))
示例#5
0
 def test_query_file_not_found(self):
     manifest = Manifest(testdata)
     result = manifest.find('unknown.exe')
     self.assertIsNone(result)
示例#6
0
 def test_query_file_not_found(self):
     manifest = Manifest(testdata)
     result = manifest.find('unknown.exe')
     self.assertIsNone(result)