diff --git a/roles/web-app-docs/files/playwright/test-languages.js b/roles/web-app-docs/files/playwright/test-languages.js
index 6a07d9ccc7..0342559047 100644
--- a/roles/web-app-docs/files/playwright/test-languages.js
+++ b/roles/web-app-docs/files/playwright/test-languages.js
@@ -8,7 +8,7 @@ const preload = decodeDotenvJsonList(
);
const samples = JSON.parse(decodeDotenvQuotedValue(process.env.DOCS_I18N_SAMPLES_JSON || "") || "{}");
const assertLanguages =
- decodeDotenvQuotedValue(process.env.DOCS_I18N_ASSERT_LANGUAGES || "true") !== "false";
+ decodeDotenvQuotedValue(process.env.DOCS_I18N_ASSERT_LANGUAGES || "") !== "false";
const translated = assertLanguages ? preload.filter((code) => code in samples) : [];
const VERSION_BUILD = 5_300_000;
diff --git a/roles/web-app-docs/templates/playwright.env.j2 b/roles/web-app-docs/templates/playwright.env.j2
index a64fba2ea0..1182218465 100644
--- a/roles/web-app-docs/templates/playwright.env.j2
+++ b/roles/web-app-docs/templates/playwright.env.j2
@@ -12,7 +12,7 @@ DESIGN_SERVICE_ENABLED={{ lookup('config', application_id, 'services.design.enab
DESIGN_TITLE={{ (lookup('design', application_id).title if lookup('design', application_id).title is string else '') | dotenv_quote }}
-# Exception: on a guide-host row the language assertion waits out two full Sphinx builds (7086s measured) and SIGKILLs the host app's wall-clock budget.
+# Exception: on a guide-host row this assertion waits out two Sphinx builds (7086s measured) and SIGKILLs the host app's budget.
DOCS_I18N_ASSERT_LANGUAGES={{ (lookup('env', 'guide_host') | trim != application_id) | string | lower }}
{% set docs_samples = {} %}
diff --git a/tests/lint/filesystem/test_design_custom_properties.py b/tests/lint/filesystem/test_design_custom_properties.py
index e165bcec9e..c9a60cbdfc 100644
--- a/tests/lint/filesystem/test_design_custom_properties.py
+++ b/tests/lint/filesystem/test_design_custom_properties.py
@@ -110,9 +110,7 @@ class TestDesignCustomProperties(unittest.TestCase):
)
def test_every_referenced_property_is_declared(self) -> None:
- sheets = [
- path for name in COMPOSED for path in sorted(ROLES.glob(f"*/{name}"))
- ]
+ sheets = [path for name in COMPOSED for path in sorted(ROLES.glob(f"*/{name}"))]
self.assertTrue(sheets, f"[{RULE}] no composed sheet found under {ROLES}")
offenders = []
for path in sheets:
diff --git a/tests/lint/filesystem/test_design_script_config_reads.py b/tests/lint/filesystem/test_design_script_config_reads.py
index e8f32616e2..0a36342a36 100644
--- a/tests/lint/filesystem/test_design_script_config_reads.py
+++ b/tests/lint/filesystem/test_design_script_config_reads.py
@@ -20,7 +20,11 @@ import unittest
from utils.cache.files import PROJECT_ROOT, read_text
ROLES = PROJECT_ROOT / "roles"
-PATTERNS = ("*/templates/design.js", "*/templates/design.js.j2", "*/templates/js/design.js.j2")
+PATTERNS = (
+ "*/templates/design.js",
+ "*/templates/design.js.j2",
+ "*/templates/js/design.js.j2",
+)
LITERAL = re.compile(r"\"[^\"\n]*\"|'[^'\n]*'|`[^`\n]*`")
INTERPOLATED = re.compile(r"\{\{[^}]*\bdesign\.urls\b")
RULE = "design-script-config-reads"
@@ -44,7 +48,6 @@ class TestDesignScriptConfigReads(unittest.TestCase):
+ "\n ".join(offenders),
)
-
def test_no_script_bakes_a_branding_url_into_its_body(self) -> None:
scripts = [path for pattern in PATTERNS for path in sorted(ROLES.glob(pattern))]
self.assertTrue(scripts, f"[{RULE}] no design script matched {PATTERNS}")
diff --git a/tests/unit/python/roles/sys-front-inj-design/__init__.py b/tests/unit/python/roles/sys-front-inj-design/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/unit/python/roles/sys-front-inj-design/test_design_config_attribute.py b/tests/unit/python/roles/sys-front-inj-design/test_design_config_attribute.py
index 23051fff31..3c32f18d94 100644
--- a/tests/unit/python/roles/sys-front-inj-design/test_design_config_attribute.py
+++ b/tests/unit/python/roles/sys-front-inj-design/test_design_config_attribute.py
@@ -18,7 +18,7 @@ import json
import unittest
from html.parser import HTMLParser
-from jinja2 import Environment
+from jinja2 import Environment, select_autoescape
from utils.cache.files import PROJECT_ROOT, read_text
@@ -31,7 +31,7 @@ TEMPLATE = (
/ "design-config.json.j2"
)
HOSTILE = (
- "Kevin's \"Nexus\" & Co",
+ 'Kevin\'s "Nexus" & Co',
"
",
"Zeilen\numbruch\tund Tab",
"Ümläute und 😀",
@@ -52,7 +52,7 @@ class _Attribute(HTMLParser):
def _render(title, logo, urls):
- environment = Environment(autoescape=False)
+ environment = Environment(autoescape=select_autoescape(default_for_string=False))
environment.filters["to_json"] = json.dumps
body = read_text(str(TEMPLATE)).split("%}\n", 1)[1]
design = {"title": title, "logo": logo, "urls": urls, "slots": {}}
@@ -60,7 +60,7 @@ def _render(title, logo, urls):
def _through_attribute(rendered: str) -> dict:
- environment = Environment(autoescape=False)
+ environment = Environment(autoescape=select_autoescape(default_for_string=False))
tag = environment.from_string(
''
).render(value=rendered.strip())