Esempio n. 1
0
 def test_remove_file(self):
     manifest = Manifest(testdata)
     result = manifest.find('/')
     self.assertIsNotNone(result)
     manifest.remove('/')
     result = manifest.find('/')
     self.assertIsNone(result)
Esempio n. 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'))
Esempio n. 3
0
 def test_remove_file(self):
     manifest = Manifest(testdata)
     result = manifest.find('/')
     self.assertIsNotNone(result)
     manifest.remove('/')
     result = manifest.find('/')
     self.assertIsNone(result)
Esempio n. 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'))
Esempio n. 5
0
 def test_query_file_not_found(self):
     manifest = Manifest(testdata)
     result = manifest.find('unknown.exe')
     self.assertIsNone(result)
Esempio n. 6
0
 def test_query_file_not_found(self):
     manifest = Manifest(testdata)
     result = manifest.find('unknown.exe')
     self.assertIsNone(result)