From e464ce765aa7b8a5da82b086f100ec990e57030e Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Sat, 1 Aug 2026 15:08:42 -0400 Subject: [PATCH] test(collections): resolve hash smart collections through the gallery query The hash search tests reached membership through `get_smart_collection_roms`, which no longer exists now that a smart collection is served as a composed query. Ask for the collection the way the gallery does instead, so the criterion is still exercised end to end. Co-Authored-By: Claude Opus 5 (1M context) --- backend/tests/handler/database/test_roms_hash_search.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/tests/handler/database/test_roms_hash_search.py b/backend/tests/handler/database/test_roms_hash_search.py index e49c36f81..f6e83606e 100644 --- a/backend/tests/handler/database/test_roms_hash_search.py +++ b/backend/tests/handler/database/test_roms_hash_search.py @@ -199,8 +199,8 @@ class TestSmartCollectionSearchTerm: def test_hash_criterion_resolves_members(self, aero: Rom, admin_user: User): collection = self._smart_collection(admin_user, AERO_MD5) - roms = db_collection_handler.get_smart_collection_roms( - collection, user_id=admin_user.id + roms = db_rom_handler.get_roms_scalar( + smart_collection_id=collection.id, user_id=admin_user.id ) assert [rom.id for rom in roms] == [aero.id] @@ -210,8 +210,8 @@ class TestSmartCollectionSearchTerm: ): collection = self._smart_collection(admin_user, DISC_ONE_MD5) - roms = db_collection_handler.get_smart_collection_roms( - collection, user_id=admin_user.id + roms = db_rom_handler.get_roms_scalar( + smart_collection_id=collection.id, user_id=admin_user.id ) assert [rom.id for rom in roms] == [multi_disc.id]