refactor: hold the run's link tables in one place

This commit is contained in:
Abdessamad Derraz committed 2026-11-23 23:07:44 +01:00
1 parent 6e8ef2650f
commit 7ad22248b5
25 files changed
+534 -492

No files matched your search

+2 -1
View File
@@ -69,6 +69,7 @@ from sitegen import platformpage
from sitegen import provenance
from sitegen import publish
from sitegen import render
from sitegen import runlinks
from sitegen import wanted as sitewanted
from model import systemnames
from model.registry import list_registered_platforms, list_release_pack_platforms
@@ -1128,7 +1129,7 @@ class EverySystemIdWithFilesHasAPage(unittest.TestCase):
def test_first_file_then_emulator(self):
files = {"f" * 40: {"path": "bios/DOS/DOS/a.bin"}}
with mock.patch("sitegen.render._card_pages", {}):
with mock.patch.object(runlinks.current(), "card_pages", {}):
place = apiitems._first_file_place(
"dos", ["f" * 40], files, {}, lambda path, sha1: "dos")
self.assertEqual(place, ("DOS", "/retrobios/systems/dos/#sha1-ffffffffffff"))