diff --git a/tests/test_templates.py b/tests/test_templates.py new file mode 100644 index 0000000..56c7e8d --- /dev/null +++ b/tests/test_templates.py @@ -0,0 +1,12 @@ +from pathlib import Path + + +def test_templates_do_not_slice_filter_results_inline(): + template_dir = Path("webui/app/templates") + offenders = [] + for template in template_dir.glob("*.html"): + content = template.read_text() + if "| default(" in content and ")[" in content: + offenders.append(str(template)) + + assert offenders == [] diff --git a/webui/app/templates/sources.html b/webui/app/templates/sources.html index 3d50445..1c5b349 100644 --- a/webui/app/templates/sources.html +++ b/webui/app/templates/sources.html @@ -48,9 +48,9 @@ {% for src in sources %}