From 3c4690ff47e67818a22d966957b2b5b8a9fb71ee Mon Sep 17 00:00:00 2001 From: Ronan Boiteau Date: Tue, 4 Jun 2024 22:57:08 +0200 Subject: [PATCH] Exclude `length_is` tests when using Django 5.1 --- tests/filters/test_trusted_filters.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/filters/test_trusted_filters.py b/tests/filters/test_trusted_filters.py index ac20335..2c71815 100644 --- a/tests/filters/test_trusted_filters.py +++ b/tests/filters/test_trusted_filters.py @@ -104,10 +104,12 @@ def test_trust_json_script(self): # TODO: Write test for last - def test_trust_length_is(self): - expected = "True" - result = self._render('{{ "abcd"|length_is:"4" }}') - assert result == expected + if VERSION <= (5, 1): + + def test_trust_length_is(self): + expected = "True" + result = self._render('{{ "abcd"|length_is:"4" }}') + assert result == expected # TODO: Write test for length # TODO: Write test for linebreaks