static and media url fix

This commit is contained in:
javad committed 2026-09-11 12:42:30 +03:30
1 parent 3a8f428461
commit 372f962f0f
7 files changed
+47 -9

No files matched your search

+16
View File
@@ -45,6 +45,22 @@ def test_nginx_serves_assets_without_proxying_django():
assert "media_data:/app/media:ro" in compose
assert "notification-worker:" in compose
assert " db:" not in compose
assert "PathPrefix(`/static/`)" in compose
assert "PathPrefix(`/media/branding/`)" in compose
assert "PathPrefix(`/protected-media/`)" in compose
assert "priority=1000" in compose
assert "stripprefix" not in compose.lower()
assert "Set MEDIA_SIGNING_SECRET in Coolify" not in compose
def test_startup_imports_production_seed_only_when_database_has_no_seed_marker():
root = Path(__file__).resolve().parents[1]
entrypoint = (root / "docker" / "entrypoint.sh").read_text(encoding="utf-8")
marker_check = "ProductionSeedState.objects.exists()"
import_command = 'python manage.py import_production_seed "$seed_dir"'
assert marker_check in entrypoint
assert entrypoint.index(marker_check) < entrypoint.index(import_command)
assert "Production seed was already applied; skipping seed import." in entrypoint
@pytest.mark.django_db