mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-21 03:09:08 -05:00
feat: give platform pages structured data
This commit is contained in:
1 parent
bfc7101166
commit
8f128b0b7f
2 files changed
+59
No files matched your search
@@ -477,5 +477,22 @@ class ArchiveMembersAreAcceptedHashes(unittest.TestCase):
|
||||
)
|
||||
|
||||
|
||||
|
||||
class PlatformPagesCarryTheirDeclarations(unittest.TestCase):
|
||||
"""Platform pages were the only content pages without structured data:
|
||||
5,640 md5 and 2,047 sha1 the platforms declare lived in the prose only."""
|
||||
|
||||
def test_parts_and_version(self):
|
||||
from generate_site import platform_structured_data
|
||||
|
||||
data = platform_structured_data("batocera", {"platform": "Batocera", "config": {
|
||||
"version": "43.1", "systems": {"sony-playstation": {"files": [
|
||||
{"name": "scph5501.bin", "destination": "scph5501.bin", "md5": "490f666e"}]}}}})
|
||||
self.assertEqual(data["about"]["softwareVersion"], "43.1")
|
||||
part = data["hasPart"][0]
|
||||
self.assertEqual(part["identifier"], ["md5:490f666e"])
|
||||
self.assertTrue(part["url"].endswith("platforms/batocera/#sony-playstation"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user