"""download_backends — the single predicate that routes a platform to the native ingester vs. gallery-dl. Pure, no DB.""" from backend.app.services.download_backends import ( NATIVE_INGESTER_PLATFORMS, uses_native_ingester, ) def test_patreon_is_native(): assert uses_native_ingester("patreon") is True assert "patreon" in NATIVE_INGESTER_PLATFORMS def test_gallery_dl_platforms_are_not_native(): # The five platforms still served by gallery-dl must NOT route to the # native ingester — guards an accidental over-broad migration. for platform in ("subscribestar", "hentaifoundry", "discord", "pixiv", "deviantart"): assert uses_native_ingester(platform) is False def test_unknown_platform_is_not_native(): assert uses_native_ingester("nonsense") is False