From 5441c657774b7df024dfcad3123e4039835935fa Mon Sep 17 00:00:00 2001 From: David Larlet Date: Mon, 12 Feb 2024 16:07:22 -0500 Subject: [PATCH] fix: custom storage for tests Setting `manifest_strict = False` will hopefully get rid of issues we have with the CI: > ValueError: Missing staticfiles manifest entry for 'umap/favicons/icon-192.png' See https://docs.djangoproject.com/en/5.0/ref/contrib/staticfiles/#django.contrib.staticfiles.storage.ManifestStaticFilesStorage.manifest_strict --- umap/storage.py | 4 ++++ umap/tests/integration/test_statics.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/umap/storage.py b/umap/storage.py index 90764373..ad3821da 100644 --- a/umap/storage.py +++ b/umap/storage.py @@ -56,3 +56,7 @@ class UmapManifestStaticFilesStorage(ManifestStaticFilesStorage): minified = cssmin(initial) path.write_text(minified) yield original_path, processed_path, True + + +class UmapManifestStaticFilesStorageNotStrict(UmapManifestStaticFilesStorage): + manifest_strict = False diff --git a/umap/tests/integration/test_statics.py b/umap/tests/integration/test_statics.py index 3f833425..d21de56a 100644 --- a/umap/tests/integration/test_statics.py +++ b/umap/tests/integration/test_statics.py @@ -24,7 +24,7 @@ def test_javascript_have_been_loaded( ): settings.STORAGES["staticfiles"][ "BACKEND" - ] = "umap.storage.UmapManifestStaticFilesStorage" + ] = "umap.storage.UmapManifestStaticFilesStorageNotStrict" datalayer.settings["displayOnLoad"] = False datalayer.save() map.settings["properties"]["defaultView"] = "latest"