Muse Dash: Add support for specifying specific DLCs (#2329)

This commit is contained in:
Justus Lind
2023-10-20 10:13:17 +10:00
committed by GitHub
parent fb6b66463d
commit 385803eb5c
7 changed files with 166 additions and 99 deletions

View File

@@ -36,14 +36,27 @@ class CollectionsTest(unittest.TestCase):
def test_free_dlc_included_in_base_songs(self) -> None:
collection = MuseDashCollections()
songs = collection.get_songs_with_settings(False, False, 0, 11)
songs = collection.get_songs_with_settings(set(), False, 0, 12)
self.assertIn("Glimmer", songs, "Budget Is Burning Vol.1 is not being included in base songs")
self.assertIn("Out of Sense", songs, "Budget Is Burning: Nano Core is not being included in base songs")
def test_dlcs(self) -> None:
collection = MuseDashCollections()
free_song_count = len(collection.get_songs_with_settings(set(), False, 0, 12))
known_mp_song = "The Happycore Idol"
for dlc in collection.DLC:
songs_with_dlc = collection.get_songs_with_settings({dlc}, False, 0, 12)
self.assertGreater(len(songs_with_dlc), free_song_count, f"DLC {dlc} did not include extra songs.")
if dlc == collection.MUSE_PLUS_DLC:
self.assertIn(known_mp_song, songs_with_dlc, f"Muse Plus missing muse plus song.")
else:
self.assertNotIn(known_mp_song, songs_with_dlc, f"DLC {dlc} includes Muse Plus songs.")
def test_remove_songs_are_not_generated(self) -> None:
collection = MuseDashCollections()
songs = collection.get_songs_with_settings(True, False, 0, 11)
songs = collection.get_songs_with_settings({x for x in collection.DLC}, False, 0, 12)
for song_name in self.REMOVED_SONGS:
self.assertNotIn(song_name, songs, f"Song '{song_name}' wasn't removed correctly.")