From 61bec5852aed5399bc251dfd06118c584792f0d1 Mon Sep 17 00:00:00 2001 From: Padraic Harley Date: Fri, 29 Jan 2016 12:45:30 +0000 Subject: Fix py26 bug and copypasta error Python 2.6 doesn't allow empty format arguments: ``{}`` must be ``{0}``. Also second test is ``inline`` rather than ``attachment``. --- wkhtmltopdf/tests/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wkhtmltopdf/tests/tests.py b/wkhtmltopdf/tests/tests.py index 5344e09..983e10a 100644 --- a/wkhtmltopdf/tests/tests.py +++ b/wkhtmltopdf/tests/tests.py @@ -137,7 +137,7 @@ class TestViews(TestCase): else: filename = '.pdf' self.assertEqual(response['Content-Disposition'], - 'attachment; filename="{}"'.format(filename)) + 'attachment; filename="{0}"'.format(filename)) # Content as a direct output response = PDFResponse(content=content, filename="nospace.pdf", @@ -161,7 +161,7 @@ class TestViews(TestCase): else: filename = '.pdf' self.assertEqual(response['Content-Disposition'], - 'attachment; filename="{}"'.format(filename)) + 'inline; filename="{0}"'.format(filename)) # Content-Type response = PDFResponse(content=content, -- cgit v1.2.3