mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-30 08:32:07 -04:00
refactor(routes): move gallery domain into routes/gallery subpackage (#4903)
Move the gallery route domain into routes/gallery/ while preserving backward-compatible legacy import shims. - app imports the canonical gallery route module - canonical gallery route code imports canonical gallery helpers - legacy gallery route/helper paths remain compatibility aliases - add shim regression coverage for module identity and monkeypatch behavior - repoint gallery source-introspection tests to the canonical paths No intended behavior change.
This commit is contained in:
@@ -80,7 +80,7 @@ def test_non_positive_env_rejected(monkeypatch, env):
|
||||
def test_routes_import_from_upload_limits_not_local_defs():
|
||||
"""Routes must import the constant, not redefine it via raw getenv / literal."""
|
||||
forbidden = {
|
||||
"routes/gallery_routes.py": [
|
||||
"routes/gallery/gallery_routes.py": [
|
||||
'int(os.getenv("ODYSSEUS_GALLERY_UPLOAD_MAX_BYTES"',
|
||||
'int(os.getenv("ODYSSEUS_GALLERY_TRANSFORM_UPLOAD_MAX_BYTES"',
|
||||
],
|
||||
@@ -97,7 +97,7 @@ def test_routes_import_from_upload_limits_not_local_defs():
|
||||
|
||||
# And each imports from upload_limits.
|
||||
imports = {
|
||||
"routes/gallery_routes.py": "GALLERY_UPLOAD_MAX_BYTES",
|
||||
"routes/gallery/gallery_routes.py": "GALLERY_UPLOAD_MAX_BYTES",
|
||||
"routes/memory_routes.py": "MEMORY_IMPORT_MAX_BYTES",
|
||||
"routes/personal_routes.py": "PERSONAL_UPLOAD_MAX_BYTES",
|
||||
"routes/email_routes.py": "EMAIL_COMPOSE_UPLOAD_MAX_BYTES",
|
||||
|
||||
Reference in New Issue
Block a user