Add a test for an issue highligthed by 76f25212d1
This commit is contained in:
parent
cd8f1a55b1
commit
ccf16d7489
@ -8,6 +8,13 @@ import tempfile
|
|||||||
|
|
||||||
from src import pdf, images, audio, office, parser_factory
|
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):
|
class TestGetMeta(unittest.TestCase):
|
||||||
def test_pdf(self):
|
def test_pdf(self):
|
||||||
p = pdf.PDFParser('./tests/data/dirty.pdf')
|
p = pdf.PDFParser('./tests/data/dirty.pdf')
|
||||||
|
Loading…
Reference in New Issue
Block a user