Commit d18859db authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'fix/thabloidtest' into 'master'

Fix warning in tests

See merge request !312
parents 443a81dd 484ea4d6
...@@ -15,17 +15,17 @@ class TestThabloid(TestCase): ...@@ -15,17 +15,17 @@ class TestThabloid(TestCase):
super().setUpClass() super().setUpClass()
cls._old_media_root = settings.MEDIA_ROOT cls._old_media_root = settings.MEDIA_ROOT
settings.MEDIA_ROOT = tempfile.mkdtemp() settings.MEDIA_ROOT = tempfile.mkdtemp()
cls.thabloid = Thabloid( with open('thabloid/fixtures/thabloid-1998-1999-1.pdf', 'rb') as f:
year=1998, cls.thabloid = Thabloid(
issue=1, year=1998,
file=File(open('thabloid/fixtures/thabloid-1998-1999-1.pdf', issue=1,
'rb'))) file=File(f))
# Only generate pages if we have 'gs' # Only generate pages if we have 'gs'
if shutil.which('gs') is None: if shutil.which('gs') is None:
cls.thabloid.save(nopages=True) cls.thabloid.save(nopages=True)
else: else:
# we should wait for gs to be done before we can do cleanup # we should wait for gs to be done before we can do cleanup
cls.thabloid.save(wait=True) cls.thabloid.save(wait=True)
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment