summaryrefslogtreecommitdiff
path: root/src/jinja2/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/jinja2/tests.py')
-rw-r--r--src/jinja2/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jinja2/tests.py b/src/jinja2/tests.py
index 229f16a..a467cf0 100644
--- a/src/jinja2/tests.py
+++ b/src/jinja2/tests.py
@@ -5,7 +5,7 @@ from collections import abc
from numbers import Number
from .runtime import Undefined
-from .utils import environmentfunction
+from .utils import pass_environment
if t.TYPE_CHECKING:
from .environment import Environment
@@ -48,7 +48,7 @@ def test_undefined(value: t.Any) -> bool:
return isinstance(value, Undefined)
-@environmentfunction
+@pass_environment
def test_filter(env: "Environment", value: str) -> bool:
"""Check if a filter exists by name. Useful if a filter may be
optionally available.
@@ -66,7 +66,7 @@ def test_filter(env: "Environment", value: str) -> bool:
return value in env.filters
-@environmentfunction
+@pass_environment
def test_test(env: "Environment", value: str) -> bool:
"""Check if a test exists by name. Useful if a test may be
optionally available.