aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf/tests
diff options
context:
space:
mode:
authorMatt Lenc <mattl@incuna.com>2014-06-19 11:26:05 +0100
committerMatt Lenc <mattl@incuna.com>2014-06-19 11:26:05 +0100
commit301bef0d6931582583a156b3195b8b13f54d2875 (patch)
tree9f6f4ada901749eaeddb32ac75c0955a5327c2b5 /wkhtmltopdf/tests
parent47dc520837b5d099fecc0db27f38ee6ebf898a80 (diff)
downloaddjango-wkhtmltopdf-301bef0d6931582583a156b3195b8b13f54d2875.tar.gz
django-wkhtmltopdf-301bef0d6931582583a156b3195b8b13f54d2875.tar.bz2
django-wkhtmltopdf-301bef0d6931582583a156b3195b8b13f54d2875.zip
Bring back the test assert for title in content
Diffstat (limited to 'wkhtmltopdf/tests')
-rw-r--r--wkhtmltopdf/tests/tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/wkhtmltopdf/tests/tests.py b/wkhtmltopdf/tests/tests.py
index f2d92aa..7365d05 100644
--- a/wkhtmltopdf/tests/tests.py
+++ b/wkhtmltopdf/tests/tests.py
@@ -8,6 +8,7 @@ import sys
from django.conf import settings
from django.test import TestCase
from django.test.client import RequestFactory
+from django.utils import six
from django.utils.encoding import smart_str
from wkhtmltopdf.subprocess import CalledProcessError
@@ -190,8 +191,8 @@ class TestViews(TestCase):
self.assertTrue(static_url in footer_content, True)
pdf_content = response.rendered_content
- self.assertTrue(pdf_content.startswith(b'%PDF-'))
- self.assertTrue(pdf_content.endswith(b'%%EOF\n'))
+ title = '\0'.join(cmd_options['title'])
+ self.assertIn(six.b(title), pdf_content)
def test_pdf_template_response_to_browser(self):
self.test_pdf_template_response(show_content=True)