summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-08-22 14:45:08 +0200
committerTim Graham <timograham@gmail.com>2017-08-22 08:57:50 -0400
commitdd82f1df556561233eab6a4a2032c2bb306dec87 (patch)
tree26e3972fb0895128780aae956125360beb895341 /tests
parentbe24b5eaa543bedfc233bff5092b8ca3762e3c70 (diff)
[1.11.x] Fixed #28502 -- Made stringformat template filter accept tuples.
Backport of 4ead705cb3cf04bb7551ac037d1e11f682b62bcf and ed77bea58274e11e5a9e4c8b9650f50deb8a2b26 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/template_tests/filter_tests/test_stringformat.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/template_tests/filter_tests/test_stringformat.py b/tests/template_tests/filter_tests/test_stringformat.py
index 9501878ebd..19e2d9eb17 100644
--- a/tests/template_tests/filter_tests/test_stringformat.py
+++ b/tests/template_tests/filter_tests/test_stringformat.py
@@ -29,6 +29,9 @@ class FunctionTests(SimpleTestCase):
def test_format(self):
self.assertEqual(stringformat(1, '03d'), '001')
+ self.assertEqual(stringformat((1, 2, 3), 's'), '(1, 2, 3)')
+ self.assertEqual(stringformat((1,), 's'), '(1,)')
def test_invalid(self):
self.assertEqual(stringformat(1, 'z'), '')
+ self.assertEqual(stringformat((1, 2, 3), 'd'), '')