diff options
| author | ryabtsev <e.ryabtsev@gmail.com> | 2018-05-27 02:56:51 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-05-26 20:56:51 -0400 |
| commit | b4fd9b5ad481c446636befa40cce5a2b5e9799fc (patch) | |
| tree | 8bb2221b16a680aad9237f8fcfd99a78a8d9589c /tests | |
| parent | 39283c8edbc5991b589d48a8e17152042193f2df (diff) | |
Fixed #29432 -- Allowed passing an integer to the slice template filter.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/template_tests/filter_tests/test_slice.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/template_tests/filter_tests/test_slice.py b/tests/template_tests/filter_tests/test_slice.py index 026db3fa7f..1b92776707 100644 --- a/tests/template_tests/filter_tests/test_slice.py +++ b/tests/template_tests/filter_tests/test_slice.py @@ -26,6 +26,9 @@ class FunctionTests(SimpleTestCase): def test_index(self): self.assertEqual(slice_filter('abcdefg', '1'), 'a') + def test_index_integer(self): + self.assertEqual(slice_filter('abcdefg', 1), 'a') + def test_negative_index(self): self.assertEqual(slice_filter('abcdefg', '-1'), 'abcdef') |
