mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 02:05:22 -04:00
test: move area_cli tests into cli directory (#3842)
* test: move area_cli tests into cli directory * test: include research CLI status in cli test move
This commit is contained in:
committed by
GitHub
parent
3e65326c3f
commit
a79c0bd369
@@ -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
|
||||
Reference in New Issue
Block a user