fix: refuse an emudeck scrape with no cores

This commit is contained in:
Abdessamad Derraz committed 2026-10-06 12:23:48 +02:00
1 parent 0eecb23724
commit 1e61b749cf
2 files changed
+21 -8

No files matched your search

+11
View File
@@ -278,3 +278,14 @@ class UnreadableReleaseStopsTheScrape(unittest.TestCase):
with mock.patch.dict("os.environ", {"GITHUB_TOKEN": "t0k"}):
self.assertEqual(github_headers()["Authorization"], "Bearer t0k")
def test_emudeck_cores_raise(self):
"""EmuDeck wrote cores: [] when the GitHub listing was refused."""
from unittest import mock
from scraper.emudeck_scraper import Scraper
with mock.patch("urllib.request.urlopen", self._refuse), self.assertRaises(
RuntimeError
):
Scraper()._fetch_installed_emulators()