mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 18:42:34 +01:00
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user