Changeset - 661603c3be88
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 1 month ago 2024-03-20 05:25:02
ben@sturm.com.au
Fix tests
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
conservancy/tests.py
Show inline comments
...
 
@@ -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)
0 comments (0 inline, 0 general)