diff options
| author | Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com> | 2017-08-19 21:22:14 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-08-19 21:22:59 +0200 |
| commit | a64f88f5be0f680a7261b500fd9243501e6a7745 (patch) | |
| tree | f8e7a9c45c5fc89c01974d2e99f69c3c71a629ba | |
| parent | 6784383e93d582f43f8cb5f7647a05645cbb339b (diff) | |
Refs #28502 -- Completed stringformat filter tests
| -rw-r--r-- | tests/template_tests/filter_tests/test_stringformat.py | 5 |
1 files changed, 5 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..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'), '') |
