aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Sabchuk <michel@turbosys.com.br>2014-09-01 11:19:20 -0300
committerMichel Sabchuk <michel@turbosys.com.br>2014-09-01 11:19:20 -0300
commit04530dcce4489c720cf02cdfb906df0cfe6f0fed (patch)
tree03a2754544b02d4b1f17cb82dfde591ebc610e56
parent8e1715bdbcc504a9ea815e401c064a6759077a2d (diff)
downloaddjango-wkhtmltopdf-04530dcce4489c720cf02cdfb906df0cfe6f0fed.tar.gz
django-wkhtmltopdf-04530dcce4489c720cf02cdfb906df0cfe6f0fed.tar.bz2
django-wkhtmltopdf-04530dcce4489c720cf02cdfb906df0cfe6f0fed.zip
Makes tests.py lines 80 columns max.
-rw-r--r--wkhtmltopdf/tests/tests.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/wkhtmltopdf/tests/tests.py b/wkhtmltopdf/tests/tests.py
index e3aa869..48a8b19 100644
--- a/wkhtmltopdf/tests/tests.py
+++ b/wkhtmltopdf/tests/tests.py
@@ -50,7 +50,9 @@ class TestUtils(TestCase):
def test_wkhtmltopdf(self):
"""Should run wkhtmltopdf to generate a PDF"""
title = 'A test template.'
- response = PDFTemplateResponse(self.factory.get('/'), None, context={'title': title})
+ response = PDFTemplateResponse(self.factory.get('/'),
+ None,
+ context={'title': title})
temp_file = response.render_to_temporary_file('sample.html')
try:
# Standard call
@@ -74,7 +76,9 @@ class TestUtils(TestCase):
def test_wkhtmltopdf_with_unicode_content(self):
"""A wkhtmltopdf call should render unicode content properly"""
title = u'♥'
- response = PDFTemplateResponse(self.factory.get('/'), None, context={'title': title})
+ response = PDFTemplateResponse(self.factory.get('/'),
+ None,
+ context={'title': title})
temp_file = response.render_to_temporary_file('unicode.html')
try:
pdf_output = wkhtmltopdf(pages=[temp_file.name])
@@ -85,7 +89,9 @@ class TestUtils(TestCase):
def test_PDFTemplateResponse_render_to_temporary_file(self):
"""Should render a template to a temporary file."""
title = 'A test template.'
- response = PDFTemplateResponse(self.factory.get('/'), None, context={'title': title})
+ response = PDFTemplateResponse(self.factory.get('/'),
+ None,
+ context={'title': title})
temp_file = response.render_to_temporary_file('sample.html')
temp_file.seek(0)
saved_content = smart_str(temp_file.read())
@@ -101,7 +107,7 @@ class TestViews(TestCase):
inline_fileheader = 'inline; filename="{0}"'
def test_pdf_response(self):
- """Should generate the correct HttpResponse object and content type."""
+ """Should generate correct HttpResponse object and content type."""
# 404
response = PDFResponse(content='', status=404)
self.assertEqual(response.status_code, 404)