aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf/tests.py
diff options
context:
space:
mode:
authorMarc Tamlyn <marc.tamlyn@gmail.com>2012-07-27 11:37:19 +0100
committerMarc Tamlyn <marc.tamlyn@gmail.com>2012-07-27 11:37:19 +0100
commitf172db7a2a7f404e6543f04fc8664800591848e4 (patch)
tree9fb9a6ebf9e78c2693a76cebef5fd9f3995080a6 /wkhtmltopdf/tests.py
parente4a84d5f2e1282ed62d19ce7c52ca57eabb54598 (diff)
downloaddjango-wkhtmltopdf-f172db7a2a7f404e6543f04fc8664800591848e4.tar.gz
django-wkhtmltopdf-f172db7a2a7f404e6543f04fc8664800591848e4.tar.bz2
django-wkhtmltopdf-f172db7a2a7f404e6543f04fc8664800591848e4.zip
Remove more deprecated stuff and tests for them.
Diffstat (limited to 'wkhtmltopdf/tests.py')
-rw-r--r--wkhtmltopdf/tests.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/wkhtmltopdf/tests.py b/wkhtmltopdf/tests.py
index 3bdc481..c55d6f9 100644
--- a/wkhtmltopdf/tests.py
+++ b/wkhtmltopdf/tests.py
@@ -4,7 +4,6 @@ from __future__ import absolute_import
import os
import sys
-import warnings
from django.test import TestCase
from django.test.client import RequestFactory
@@ -275,30 +274,3 @@ class TestViews(TestCase):
view.cmd_options.update(cmd_options)
self.assertEqual(view.cmd_options, cmd_options)
self.assertEqual(PDFTemplateView.cmd_options, {})
-
- def test_deprecated(self):
- """Should warn when using deprecated views."""
- with warnings.catch_warnings(record=True) as w:
- warnings.simplefilter('always')
- PdfTemplateView()
- self.assertEqual(len(w), 1)
- self.assertEqual(w[0].category, PendingDeprecationWarning)
- self.assertTrue(
- 'PDFTemplateView' in str(w[0].message),
- "'PDFTemplateView' not in {0!r}".format(w[0].message))
- with warnings.catch_warnings(record=True) as w:
- warnings.simplefilter('always')
- PdfResponse(None, None)
- self.assertEqual(len(w), 1)
- self.assertEqual(w[0].category, PendingDeprecationWarning)
- self.assertTrue(
- 'PDFResponse' in str(w[0].message),
- "'PDFResponse' not in {0!r}".format(w[0].message))
- with warnings.catch_warnings(record=True) as w:
- warnings.simplefilter('always')
- PDFTemplateView().get_pdf_kwargs()
- self.assertEqual(len(w), 1)
- self.assertEqual(w[0].category, PendingDeprecationWarning)
- self.assertTrue(
- 'get_pdf_kwargs()' in str(w[0].message),
- "'get_pdf_kwargs()' not in {0!r}".format(w[0].message))