Release v0.1.9: enforce Photos API boundary and finalize Server migration
This commit is contained in:
@@ -62,12 +62,16 @@ def test_cached_dimensions_invalidation_and_no_fallback(
|
||||
),
|
||||
)
|
||||
assert len(oriented.catalog("family")) == 1
|
||||
from pigway_frame_flow.providers.photo_sources import dimensions
|
||||
|
||||
monkeypatch.setattr(
|
||||
"pigway_frame_flow.providers.photo_sources.dimensions",
|
||||
lambda *a: pytest.fail("unchanged dimensions should be cached"),
|
||||
)
|
||||
assert len(oriented.catalog("family", refresh=True)) == 1
|
||||
monkeypatch.undo()
|
||||
monkeypatch.setattr(
|
||||
"pigway_frame_flow.providers.photo_sources.dimensions", dimensions
|
||||
)
|
||||
Image.new("RGB", (50, 100)).save(settings.photo_root / "20240101 Day" / "wide.jpg")
|
||||
assert oriented.catalog("family", refresh=True) == []
|
||||
with pytest.raises(FlowError):
|
||||
@@ -110,3 +114,7 @@ def test_orientation_validation_and_api(client, oriented):
|
||||
).json()["error"]["code"]
|
||||
== "UNSUPPORTED_CAPABILITY"
|
||||
)
|
||||
|
||||
|
||||
# Legacy algorithms remain covered; production filesystem access is tested separately.
|
||||
pytestmark = pytest.mark.usefixtures("legacy_photo_engine")
|
||||
|
||||
Reference in New Issue
Block a user