From a12b5b6dae037dceffe2b6721ed2d45eee72f526 Mon Sep 17 00:00:00 2001 From: Niicck Date: Thu, 11 Jul 2024 21:16:25 -0500 Subject: [PATCH] fix test_load_dynamic_import_manifest --- tests/tests/test_asset_loader.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/tests/test_asset_loader.py b/tests/tests/test_asset_loader.py index ca9c06d..fc4dbee 100644 --- a/tests/tests/test_asset_loader.py +++ b/tests/tests/test_asset_loader.py @@ -1,5 +1,7 @@ import pytest +from pathlib import Path +from django.conf import settings from django_vite.core.asset_loader import DjangoViteConfig, ManifestClient from django_vite.templatetags.django_vite import DjangoViteAssetLoader from django_vite.apps import check_loader_instance @@ -133,17 +135,20 @@ def test_parse_manifest_during_dev_mode(dev_mode_true): [ { "DJANGO_VITE_DEV_MODE": False, - "DJANGO_VITE_MANIFEST_PATH": "dynamic-entry-manifest.json", + "DJANGO_VITE_MANIFEST_PATH": Path(settings.STATIC_ROOT) + / "dynamic-entry-manifest.json", }, { "DJANGO_VITE": { "default": { "dev_mode": False, - "manifest_path": "dynamic-entry-manifest.json", + "manifest_path": Path(settings.STATIC_ROOT) + / "dynamic-entry-manifest.json", } } }, ], + indirect=True, ) def test_load_dynamic_import_manifest(patch_settings): warnings = check_loader_instance()