Skip to content
Snippets Groups Projects
Commit ccf16d74 authored by Julien (jvoisin) Voisin's avatar Julien (jvoisin) Voisin
Browse files

Add a test for an issue highligthed by 76f25212

parent cd8f1a55
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment