Test soundness of new configuration dictionaries.

This commit is contained in:
Bastian Kleineidam 2010-03-03 20:13:44 +01:00
parent fbc4a15cd1
commit 5cee1fc9c8
1 changed files with 10 additions and 0 deletions

View File

@ -35,3 +35,13 @@ class TestConfiguration (unittest.TestCase):
def test_encoding_programs (self):
self.assertEqual(set(patoolib.ArchiveEncodings),
set(patoolib.EncodingPrograms.keys()))
def test_encoding_mimes (self):
self.assertEqual(set(patoolib.ArchiveEncodings),
set(patoolib.util.Encoding2Mime.keys()))
for mime in patoolib.util.Encoding2Mime.values():
self.assertTrue(mime in patoolib.ArchiveMimetypes)
def test_filetext_mime (self):
for mime in patoolib.util.FileText2Mime.values():
self.assertTrue(mime in patoolib.ArchiveMimetypes)