From 9a3dfa2a524aedb8580b7311585f9d52f252f4e7 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 17 Aug 2015 10:03:22 -0400 Subject: Refs #23261 -- Removed old style list syntax for unordered_list filter Per deprecation timeline. --- .../filter_tests/test_unordered_list.py | 57 +--------------------- 1 file changed, 1 insertion(+), 56 deletions(-) (limited to 'tests') diff --git a/tests/template_tests/filter_tests/test_unordered_list.py b/tests/template_tests/filter_tests/test_unordered_list.py index 4fbc22a657..eab9442780 100644 --- a/tests/template_tests/filter_tests/test_unordered_list.py +++ b/tests/template_tests/filter_tests/test_unordered_list.py @@ -1,6 +1,5 @@ from django.template.defaultfilters import unordered_list -from django.test import SimpleTestCase, ignore_warnings -from django.utils.deprecation import RemovedInDjango110Warning +from django.test import SimpleTestCase from django.utils.encoding import python_2_unicode_compatible from django.utils.safestring import mark_safe @@ -14,7 +13,6 @@ class UnorderedListTests(SimpleTestCase): output = self.engine.render_to_string('unordered_list01', {'a': ['x>', ['x>\n\t\n\t') - @ignore_warnings(category=RemovedInDjango110Warning) @setup({'unordered_list02': '{% autoescape off %}{{ a|unordered_list }}{% endautoescape %}'}) def test_unordered_list02(self): output = self.engine.render_to_string('unordered_list02', {'a': ['x>', ['x>\n\t
    \n\t\t
  • \n\t
\n\t') -@ignore_warnings(category=RemovedInDjango110Warning) -class DeprecatedUnorderedListSyntaxTests(SimpleTestCase): - - @setup({'unordered_list01': '{{ a|unordered_list }}'}) - def test_unordered_list01(self): - output = self.engine.render_to_string('unordered_list01', {'a': ['x>', [['x>\n\t
    \n\t\t
  • <y
  • \n\t
\n\t') - - @setup({'unordered_list02': '{% autoescape off %}{{ a|unordered_list }}{% endautoescape %}'}) - def test_unordered_list02(self): - output = self.engine.render_to_string('unordered_list02', {'a': ['x>', [['x>\n\t
    \n\t\t
  • \n\t
\n\t') - - @setup({'unordered_list03': '{{ a|unordered_list }}'}) - def test_unordered_list03(self): - output = self.engine.render_to_string('unordered_list03', {'a': ['x>', [[mark_safe('x>\n\t
    \n\t\t
  • \n\t
\n\t') - - @setup({'unordered_list04': '{% autoescape off %}{{ a|unordered_list }}{% endautoescape %}'}) - def test_unordered_list04(self): - output = self.engine.render_to_string('unordered_list04', {'a': ['x>', [[mark_safe('x>\n\t
    \n\t\t
  • \n\t
\n\t') - - @setup({'unordered_list05': '{% autoescape off %}{{ a|unordered_list }}{% endautoescape %}'}) - def test_unordered_list05(self): - output = self.engine.render_to_string('unordered_list05', {'a': ['x>', [['x>\n\t
    \n\t\t
  • \n\t
\n\t') - - class FunctionTests(SimpleTestCase): def test_list(self): @@ -171,27 +140,3 @@ class FunctionTests(SimpleTestCase): unordered_list(item_generator(), autoescape=False), '\t
  • ulitem-a
  • \n\t
  • ulitem-b
  • \n\t
  • ulitem-c
  • ', ) - - @ignore_warnings(category=RemovedInDjango110Warning) - def test_legacy(self): - """ - Old format for unordered lists should still work - """ - self.assertEqual(unordered_list(['item 1', []]), '\t
  • item 1
  • ') - - self.assertEqual( - unordered_list(['item 1', [['item 1.1', []]]]), - '\t
  • item 1\n\t
      \n\t\t
    • item 1.1
    • \n\t
    \n\t
  • ', - ) - - self.assertEqual( - unordered_list(['item 1', [['item 1.1', []], - ['item 1.2', []]]]), '\t
  • item 1\n\t
      \n\t\t
    • item 1.1' - '
    • \n\t\t
    • item 1.2
    • \n\t
    \n\t
  • ', - ) - - self.assertEqual( - unordered_list(['States', [['Kansas', [['Lawrence', []], ['Topeka', []]]], ['Illinois', []]]]), - '\t
  • States\n\t
      \n\t\t
    • Kansas\n\t\t
        \n\t\t\t
      • Lawrence
      • ' - '\n\t\t\t
      • Topeka
      • \n\t\t
      \n\t\t
    • \n\t\t
    • Illinois
    • \n\t
    \n\t
  • ', - ) -- cgit v1.3