Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
d18859db
Commit
d18859db
authored
Jan 19, 2017
by
Thom Wiggers
📐
Browse files
Merge branch 'fix/thabloidtest' into 'master'
Fix warning in tests See merge request
!312
parents
443a81dd
484ea4d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/thabloid/tests.py
View file @
d18859db
...
...
@@ -15,17 +15,17 @@ class TestThabloid(TestCase):
super
().
setUpClass
()
cls
.
_old_media_root
=
settings
.
MEDIA_ROOT
settings
.
MEDIA_ROOT
=
tempfile
.
mkdtemp
()
cls
.
thabloid
=
Thabloid
(
year
=
1998
,
issue
=
1
,
file
=
File
(
open
(
'thabloid/fixtures/thabloid-1998-1999-1.pdf'
,
'rb'
)
))
# Only generate pages if we have 'gs'
if
shutil
.
which
(
'gs'
)
is
None
:
cls
.
thabloid
.
save
(
nopages
=
True
)
else
:
# we should wait for gs to be done before we can do cleanup
cls
.
thabloid
.
save
(
wait
=
True
)
with
open
(
'thabloid/fixtures/thabloid-1998-1999-1.pdf'
,
'rb'
)
as
f
:
cls
.
thabloid
=
Thabloid
(
year
=
1998
,
issue
=
1
,
file
=
File
(
f
))
# Only generate pages if we have 'gs'
if
shutil
.
which
(
'gs'
)
is
None
:
cls
.
thabloid
.
save
(
nopages
=
True
)
else
:
# we should wait for gs to be done before we can do cleanup
cls
.
thabloid
.
save
(
wait
=
True
)
@
classmethod
def
tearDownClass
(
cls
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment