diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2020-01-30 18:16:38 +0100 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2020-01-30 09:40:14 -0800 |
commit | 15d7e615f4dc81424ad15b852ca69d1d98129139 (patch) | |
tree | 05791d5caa0ebb8dd6ca876df93452c8c2ad55ca /tests | |
parent | 05dee9b87023930f8131cbc0815b56a23e973c3d (diff) | |
download | jinja2-15d7e615f4dc81424ad15b852ca69d1d98129139.tar.gz |
Added regression test for slicing of attributes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_async.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_async.py b/tests/test_async.py index f7e2792..d6c4a23 100644 --- a/tests/test_async.py +++ b/tests/test_async.py @@ -579,3 +579,7 @@ class TestAsyncForLoop(object): def test_bare_async(self, test_env_async): t = test_env_async.from_string('{% extends "header" %}') assert t.render(foo=42) == "[42|23]" + + def test_awaitable_property_slicing(self, test_env_async): + t = test_env_async.from_string("{% for x in a.b[:1] %}{{ x }}{% endfor %}") + assert t.render(a=dict(b=[1, 2, 3])) == "1" |