From 661603c3be8888ad5152b532b53d698459fd0627 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Wed, 20 Mar 2024 16:23:36 +1100 Subject: [PATCH] Fix tests --- conservancy/tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conservancy/tests.py b/conservancy/tests.py index e81ad13b..f68194d4 100644 --- a/conservancy/tests.py +++ b/conservancy/tests.py @@ -36,7 +36,8 @@ def test_annual_report_file_served(rf): def test_path_traversal_404s(rf): - assert (settings.BASE_DIR / 'static' / 'about/../../settings.py').exists() - request = rf.get('/about/../../settings.py') + # Will work in development only + assert (settings.BASE_DIR / 'static' / 'about/../../../conservancy-website.sqlite3').exists() + request = rf.get('/about/../../../conservancy-website.sqlite3') with pytest.raises(Http404): views.index(request)