mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-29 12:58:51 -06:00
refactor: render pages from a PageMeta in tests
This commit is contained in:
1 parent
c7d89627fb
commit
ec3a6ab8af
5 files changed
+67
-73
No files matched your search
@@ -157,9 +157,13 @@ class TheTableOfContentsOfACardPageStopsAtLevelTwo(unittest.TestCase):
|
||||
import yaml
|
||||
|
||||
body = "# T\n\n" + "".join(f"## S{i}\n\n### card\n\n" for i in range(sections))
|
||||
_target, text = sitestarlight.finalize_page(
|
||||
rel, body, level="", weight=None, browser_title="T", description="d",
|
||||
structured={}, terms={})
|
||||
_target, text = sitestarlight.render_page(
|
||||
rel,
|
||||
body,
|
||||
sitestarlight.PageMeta(
|
||||
level="", weight=None, browser_title="T", description="d", structured={}, terms={}
|
||||
),
|
||||
)
|
||||
return yaml.safe_load(text.split("---\n")[1]).get("tableOfContents", "default")
|
||||
|
||||
def test_cards_leave_the_toc_and_wiki_pages_keep_level_three(self):
|
||||
|
||||
Reference in new issue
Block a user