diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2020-01-30 18:16:38 +0100 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2020-01-30 18:16:38 +0100 |
commit | a2ac50f1572edd52ac8002a7b03db58a8babf4da (patch) | |
tree | 1370b530988c1d0f245910080dae5e8949947239 | |
parent | 1c666f7f02b6c0234794d9372994038023d8a89e (diff) | |
download | jinja2-bugfix/attribute-access.tar.gz |
Added regression test for slicing of attributesbugfix/attribute-access
-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..5f6e073 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" |