Squash Odysseus development history

This commit is contained in:
pewdiepie-archdaemon
2026-09-11 06:04:19 +00:00
parent e5c99a5eee
commit 6ee6502010
2050 changed files with 538359 additions and 57745 deletions
+13
View File
@@ -0,0 +1,13 @@
from types import SimpleNamespace
from tests.helpers.cli_loader import load_script
from tests.helpers.db_stubs import make_core_db_stub
def test_album_image_count_handles_missing_relationship(monkeypatch):
make_core_db_stub(monkeypatch, models=["GalleryImage", "GalleryAlbum"])
cli = load_script("odysseus-gallery")
assert cli._album_image_count(SimpleNamespace(images=[1, 2])) == 2
assert cli._album_image_count(SimpleNamespace(images=None)) == 0
assert cli._album_image_count(SimpleNamespace(images=object())) == 0