From 0b060fe40f8e01d978cf69dc9dde26c73911b34c Mon Sep 17 00:00:00 2001 From: Justine Fricou Date: Wed, 10 Jul 2024 15:56:14 +0200 Subject: [PATCH] Fix cache-related test for PathRouter --- geotrek/core/tests/test_path_router.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/geotrek/core/tests/test_path_router.py b/geotrek/core/tests/test_path_router.py index b9d1288f5f..ca4b8d8f97 100644 --- a/geotrek/core/tests/test_path_router.py +++ b/geotrek/core/tests/test_path_router.py @@ -95,10 +95,11 @@ def test_set_cs_graph_set_cache(self): PathFactory(geom=LineString((0, 0), (1, 1))) PathFactory(geom=LineString((2, 2), (3, 3))) cache = caches['fat'] - cached_data_before = cache.get('dijkstra_matrix') + cache.set('dijkstra_matrix', (Path.no_draft_latest_updated(), None)) + (_, cached_data_before) = cache.get('dijkstra_matrix') self.assertIsNone(cached_data_before) PathRouter() - cached_data_after = cache.get('dijkstra_matrix') + (__, cached_data_after) = cache.get('dijkstra_matrix') self.assertIsNotNone(cached_data_after) def test_set_cs_graph_get_from_cache(self):