Skip to content

Commit

Permalink
Fix cache-related test for PathRouter
Browse files Browse the repository at this point in the history
  • Loading branch information
justinefricou committed Jul 11, 2024
1 parent 5729b14 commit 2d611ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions geotrek/core/tests/test_path_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2d611ab

Please sign in to comment.