Fix tests
This commit is contained in:
		
							parent
							
								
									43e7c7e358
								
							
						
					
					
						commit
						661603c3be
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -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) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue