File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
readthedocs/proxito/tests Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,20 @@ def test_versioned_no_slash(self):
287
287
response ['location' ], '/en/latest/' ,
288
288
)
289
289
290
+ @mock .patch ('readthedocs.proxito.views.serve.get_storage_class' )
291
+ def test_subproject_no_slash (self , storage_mock ):
292
+ self .subproject .versions .update (active = True , built = True )
293
+ storage_mock ()().exists .return_value = False
294
+ response = self .client .get (
295
+ reverse ('proxito_404_handler' , kwargs = {'proxito_path' : '/projects/subproject' }),
296
+ HTTP_HOST = 'project.readthedocs.io' ,
297
+ )
298
+ self .assertEqual (
299
+ response .status_code , 302
300
+ )
301
+ self .assertEqual (
302
+ response ['location' ], '/projects/subproject/' ,
303
+ )
290
304
291
305
@mock .patch ('readthedocs.proxito.views.serve.get_storage_class' )
292
306
def test_directory_indexes_readme_serving (self , storage_mock ):
You can’t perform that action at this time.
0 commit comments