test_the_default_theme_is_bundled_and_self_contained¶
Tests › tests/test_wiki_site.py
What this test is for
Why it exists
THE FONTS SHIP WITH THEIR LICENCES and load same-origin; nothing on any page is remote.
Verifies REQ-DDB-WIKI-011 REQ-DDB-WIKI-012 REQ-DDB-WIKI-013 REQ-DDB-WIKI-014 REQ-DDB-WIKI-015 REQ-DDB-WIKI-018 REQ-DDB-WIKI-020 REQ-DDB-WIKI-021 REQ-DDB-WIKI-022 REQ-DDB-WIKI-023 REQ-DDB-WIKI-025 REQ-DDB-WIKI-031 REQ-DDB-WIKI-044 REQ-DDB-WIKI-050 REQ-DDB-WIKI-052
Given
css = site["_static/clew.css"]for name, text in site.items(): if name.endswith(".html"): assert "fonts.googleapis" not in text and "https://cdn" not in text, name assert "_static/clew.css" in text, name
When
- —
Then
- ✓ css contains "--paper:"
- ✓ css contains "--acc:"
- ✓ site["_static/fonts/clew-fonts.css"] contains "@font-face"
- ✓ {"manrope.ttf", "newsreader.ttf", "jetbrains-mono.ttf"} is at most set(site["__fonts__"].split())
- ✓ site["__licenses__"] contains "OFL"
tests/test_wiki_site.py:244 · its file's page
What it checks (6)
assert "--paper:" in css and "--acc:" in cssnot attributedassert "@font-face" in site["_static/fonts/clew-fonts.css"]not attributedassert {"manrope.ttf", "newsreader.ttf", "jetbrains-mono.ttf"} <= set(site["__fonts__"].split())not attributedassert "OFL" in site["__licenses__"]not attributedassert "fonts.googleapis" not in text and "https://cdn" not in text, namenot attributedassert "_static/clew.css" in text, namenot attributed
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Requirements it verifies (15)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | unknown |
| REQ-DDB-WIKI-012 | catalog | unknown |
| REQ-DDB-WIKI-013 | catalog | unknown |
| REQ-DDB-WIKI-014 | catalog | unknown |
| REQ-DDB-WIKI-015 | catalog | unknown |
| REQ-DDB-WIKI-018 | catalog | unknown |
| REQ-DDB-WIKI-020 | catalog | unknown |
| REQ-DDB-WIKI-021 | catalog | unknown |
| REQ-DDB-WIKI-022 | catalog | unknown |
| REQ-DDB-WIKI-023 | catalog | unknown |
| REQ-DDB-WIKI-025 | catalog | unknown |
| REQ-DDB-WIKI-031 | catalog | unknown |
| REQ-DDB-WIKI-044 | catalog | unknown |
| REQ-DDB-WIKI-050 | catalog | unknown |
| REQ-DDB-WIKI-052 | catalog | unknown |