From: Armin Ronacher Date: Thu, 30 Jan 2020 17:16:38 +0000 (+0100) Subject: Added regression test for slicing of attributes X-Git-Tag: 2.11.1~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15d7e615f4dc81424ad15b852ca69d1d98129139;p=thirdparty%2Fjinja.git Added regression test for slicing of attributes --- diff --git a/tests/test_async.py b/tests/test_async.py index f7e27922..d6c4a239 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"