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

Add a working test

parent 13d2507d
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python3
import unittest
import shutil
import os
from src import parsers
from src.parsers import pdf
class TestGetMeta(unittest.TestCase):
def test_pdf(self):
p = pdf.PDFParser('./tests/data/dirty.pdf')
meta = p.get_meta().items()
class TestCleaning(unittest.TestCase):
def setUp(self):
shutil.copy('./tests/data/dirty.pdf', './tests/data/clean.pdf')
def tearDown(self):
#os.remove('./tests/data/clean.pdf')
pass
def test_pdf(self):
p = pdf.PDFParser('./tests/data/clean.pdf')
p.remove_all()
#self.assertEqual(p.get_meta(), {})
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