From 1ee0f5ca84c3bab253ba8744b37b6b901ff19089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Fri, 29 Nov 2024 14:45:56 +0100 Subject: [PATCH] Fix test --- tests/test_integration/test_cache_integration.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_integration/test_cache_integration.py b/tests/test_integration/test_cache_integration.py index 41ab850..0f752f9 100644 --- a/tests/test_integration/test_cache_integration.py +++ b/tests/test_integration/test_cache_integration.py @@ -46,12 +46,14 @@ def test_page_included_by_url_is_cached( tmp_path, plugin, ): - cache_dir = get_cache_directory('') if not is_platformdirs_installed(): - assert cache_dir is None - assert initialize_cache(600) is None + assert initialize_cache(600, '') is None return + cache_dir = get_cache_directory('') + if not os.path.isdir(cache_dir): + os.makedirs(cache_dir, exist_ok=True) + file_path = os.path.join( cache_dir, Cache.generate_unique_key_from_url(url), )