diff options
| author | Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com> | 2017-08-16 17:57:59 +0530 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-08-21 09:04:43 +0200 |
| commit | 4ead705cb3cf04bb7551ac037d1e11f682b62bcf (patch) | |
| tree | e47600f5ef0895c1ddf2df57d03d57d601a597f9 /tests | |
| parent | 9229e005aaffc7d3a2015f7a23b1ba1de8d85b63 (diff) | |
Fixed #28502 -- Made stringformat template filter accept tuples
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/template_tests/filter_tests/test_stringformat.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/template_tests/filter_tests/test_stringformat.py b/tests/template_tests/filter_tests/test_stringformat.py index 9912f50842..8efa5e0599 100644 --- a/tests/template_tests/filter_tests/test_stringformat.py +++ b/tests/template_tests/filter_tests/test_stringformat.py @@ -30,6 +30,8 @@ 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, 3), 's'), '(1, 2, 3)') + self.assertEqual(stringformat((1,), 's'), '(1,)') self.assertEqual(stringformat({1, 2}, 's'), '{1, 2}') self.assertEqual(stringformat({1: 2, 2: 3}, 's'), '{1: 2, 2: 3}') |
