From a64f88f5be0f680a7261b500fd9243501e6a7745 Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Sat, 19 Aug 2017 21:22:14 +0200 Subject: [PATCH] Refs #28502 -- Completed stringformat filter tests --- tests/template_tests/filter_tests/test_stringformat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/template_tests/filter_tests/test_stringformat.py b/tests/template_tests/filter_tests/test_stringformat.py index 9501878ebd..9912f50842 100644 --- a/tests/template_tests/filter_tests/test_stringformat.py +++ b/tests/template_tests/filter_tests/test_stringformat.py @@ -29,6 +29,11 @@ class FunctionTests(SimpleTestCase): def test_format(self): self.assertEqual(stringformat(1, '03d'), '001') + self.assertEqual(stringformat([1, None], 's'), '[1, None]') + self.assertEqual(stringformat({1, 2}, 's'), '{1, 2}') + self.assertEqual(stringformat({1: 2, 2: 3}, 's'), '{1: 2, 2: 3}') def test_invalid(self): self.assertEqual(stringformat(1, 'z'), '') + self.assertEqual(stringformat(object(), 'd'), '') + self.assertEqual(stringformat(None, 'd'), '')