diff options
Diffstat (limited to 'wkhtmltopdf/tests')
-rw-r--r-- | wkhtmltopdf/tests/tests.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/wkhtmltopdf/tests/tests.py b/wkhtmltopdf/tests/tests.py index fc1545d..5344e09 100644 --- a/wkhtmltopdf/tests/tests.py +++ b/wkhtmltopdf/tests/tests.py @@ -133,11 +133,11 @@ class TestViews(TestCase): try: import unidecode except ImportError: - self.assertEqual(response['Content-Disposition'], - 'attachment; filename="?.pdf"') + filename = '?.pdf' else: - self.assertEqual(response['Content-Disposition'], - 'attachment; filename=".pdf"') + filename = '.pdf' + self.assertEqual(response['Content-Disposition'], + 'attachment; filename="{}"'.format(filename)) # Content as a direct output response = PDFResponse(content=content, filename="nospace.pdf", @@ -157,11 +157,11 @@ class TestViews(TestCase): try: import unidecode except ImportError: - self.assertEqual(response['Content-Disposition'], - 'inline; filename="?.pdf"') + filename = '?.pdf' else: - self.assertEqual(response['Content-Disposition'], - 'inline; filename=".pdf"') + filename = '.pdf' + self.assertEqual(response['Content-Disposition'], + 'attachment; filename="{}"'.format(filename)) # Content-Type response = PDFResponse(content=content, |