@@ -1505,6 +1505,10 @@ def test_project_packages_export_json(self):
15051505
15061506 self .assertIsInstance (response , FileResponse )
15071507 self .assertEqual (response .get ("Content-Type" ), "application/json" )
1508+ self .assertTrue (response .get ("Content-Disposition" ).startswith ("inline" ))
1509+
1510+ with override_settings (SCANPIPE = {"INLINE_DOWNLOAD_MAX_SIZE" : 0 }):
1511+ response = self .client .get (url + "?export_json=True" )
15081512 self .assertTrue (response .get ("Content-Disposition" ).startswith ("attachment" ))
15091513
15101514 file_content = b"" .join (response .streaming_content ).decode ("utf-8" )
@@ -1570,7 +1574,7 @@ def test_project_dependencies_export_json(self):
15701574
15711575 self .assertIsInstance (response , FileResponse )
15721576 self .assertEqual (response .get ("Content-Type" ), "application/json" )
1573- self .assertTrue (response .get ("Content-Disposition" ).startswith ("attachment " ))
1577+ self .assertTrue (response .get ("Content-Disposition" ).startswith ("inline " ))
15741578
15751579 file_content = b"" .join (response .streaming_content ).decode ("utf-8" )
15761580 json_data = json .loads (file_content )
@@ -1606,7 +1610,7 @@ def test_project_relations_export_json(self):
16061610
16071611 self .assertIsInstance (response , FileResponse )
16081612 self .assertEqual (response .get ("Content-Type" ), "application/json" )
1609- self .assertTrue (response .get ("Content-Disposition" ).startswith ("attachment " ))
1613+ self .assertTrue (response .get ("Content-Disposition" ).startswith ("inline " ))
16101614
16111615 file_content = b"" .join (response .streaming_content ).decode ("utf-8" )
16121616 json_data = json .loads (file_content )
@@ -1630,7 +1634,7 @@ def test_project_messages_export_json(self):
16301634
16311635 self .assertIsInstance (response , FileResponse )
16321636 self .assertEqual (response .get ("Content-Type" ), "application/json" )
1633- self .assertTrue (response .get ("Content-Disposition" ).startswith ("attachment " ))
1637+ self .assertTrue (response .get ("Content-Disposition" ).startswith ("inline " ))
16341638
16351639 file_content = b"" .join (response .streaming_content ).decode ("utf-8" )
16361640 json_data = json .loads (file_content )
@@ -1656,7 +1660,7 @@ def test_project_codebase_resources_export_json(self):
16561660
16571661 self .assertIsInstance (response , FileResponse )
16581662 self .assertEqual (response .get ("Content-Type" ), "application/json" )
1659- self .assertTrue (response .get ("Content-Disposition" ).startswith ("attachment " ))
1663+ self .assertTrue (response .get ("Content-Disposition" ).startswith ("inline " ))
16601664
16611665 file_content = b"" .join (response .streaming_content ).decode ("utf-8" )
16621666 json_data = json .loads (file_content )
0 commit comments