1
0
mirror of synced 2024-11-06 01:18:51 +01:00

Add a test for an issue highligthed by 76f25212d1

This commit is contained in:
jvoisin 2018-04-03 23:29:34 +02:00
parent cd8f1a55b1
commit ccf16d7489

View File

@ -8,6 +8,13 @@ import tempfile
from src import pdf, images, audio, office, parser_factory
class TestParserFactory(unittest.TestCase):
def test_subsubcalss(self):
""" Test that our module auto-detection is handling sub-sub-classes """
parser, mimetype = parser_factory.get_parser('./tests/data/dirty.mp3')
self.assertEqual(mimetype, 'audio/mpeg')
self.assertEqual(parser.__class__, audio.MP3Parser)
class TestGetMeta(unittest.TestCase):
def test_pdf(self):
p = pdf.PDFParser('./tests/data/dirty.pdf')