Revert "Show AllManga alternative watchlist titles"
This reverts commit 84c2e533d0.
This commit is contained in:
-31
@@ -849,23 +849,6 @@ class WatchlistCompletionTests(unittest.TestCase):
|
||||
self.assertIn("Sub ready.", item["status_message"])
|
||||
self.assertIn("Dub ready.", item["status_message"])
|
||||
|
||||
def test_refresh_persists_allmanga_alternative_titles(self):
|
||||
self.seed_watchlist_item()
|
||||
snapshot = {
|
||||
"show_id": "show-1",
|
||||
"title": "Example Show",
|
||||
"episodes": {"sub": ["1"], "dub": []},
|
||||
}
|
||||
with mock.patch.object(APP, "fetch_show_episode_snapshot", return_value=snapshot), mock.patch.object(
|
||||
APP, "resolve_animeschedule_anime", return_value=None
|
||||
), mock.patch.object(
|
||||
APP, "fetch_allmanga_alternative_titles", return_value={"english_title": "Example Show English", "alt_titles": ["Example Show English", "Sample Alias"]}
|
||||
), mock.patch.object(APP.WatchlistStore, "ensure_thumbnail", return_value=None):
|
||||
item = APP.WATCHLIST.refresh("show-1")
|
||||
|
||||
self.assertEqual(item["english_title"], "Example Show English")
|
||||
self.assertEqual(item["display_alt_titles"], ["Example Show English", "Sample Alias"])
|
||||
|
||||
def test_list_filters_by_category_and_reports_category_counts(self):
|
||||
self.seed_watchlist_item(show_id="show-1", title="Watching Show", category="watching", status="queued")
|
||||
self.seed_watchlist_item(show_id="show-2", title="Finished Show", category="finished", downloaded=True)
|
||||
@@ -1745,26 +1728,12 @@ class TemplateHelperTests(unittest.TestCase):
|
||||
self.assertIn('api("/api/watchlist/download-all"', APP.WATCHLIST_HTML)
|
||||
self.assertIn("Enter sub or dub", APP.WATCHLIST_HTML)
|
||||
|
||||
def test_watchlist_page_shows_alternative_titles(self):
|
||||
self.assertIn('class="alt-title"', APP.WATCHLIST_HTML)
|
||||
self.assertIn('Alt: ${item.display_alt_titles.join(" · ")}', APP.WATCHLIST_HTML)
|
||||
|
||||
def test_watchlist_thumbnail_warmup_skips_repeated_attempts(self):
|
||||
self.assertIn("thumbnailWarmupPending: new Set()", APP.WATCHLIST_HTML)
|
||||
self.assertIn("function thumbnailWarmupToken(item)", APP.WATCHLIST_HTML)
|
||||
self.assertIn("if (state.thumbnailWarmupTokens[item.show_id] === token) continue;", APP.WATCHLIST_HTML)
|
||||
self.assertIn("state.thumbnailWarmupPending.delete(showId);", APP.WATCHLIST_HTML)
|
||||
|
||||
def test_parse_allmanga_alternative_titles_extracts_english_and_synonyms(self):
|
||||
html_text = """
|
||||
<script>
|
||||
{"englishTitle":"Example Show English","synonyms":["Sample Alias","Example Show"]}
|
||||
</script>
|
||||
"""
|
||||
parsed = APP.parse_allmanga_alternative_titles(html_text, primary_title="Example Show")
|
||||
self.assertEqual(parsed["english_title"], "Example Show English")
|
||||
self.assertEqual(parsed["alt_titles"], ["Example Show English", "Sample Alias"])
|
||||
|
||||
|
||||
class AniDbCacheTests(unittest.TestCase):
|
||||
def test_get_cached_anidb_titles_reuses_cached_entries(self):
|
||||
|
||||
Reference in New Issue
Block a user