File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -763,7 +763,7 @@ def test_scanpipe_pipes_outputs_to_all_formats(self):
763763 call_command ("loaddata" , fixtures , ** {"verbosity" : 0 })
764764 project = Project .objects .get (name = "asgiref" )
765765
766- with self .assertNumQueries (35 ):
766+ with self .assertNumQueries (39 ):
767767 output_file = output .to_all_formats (project = project )
768768
769769 self .assertEqual ("asgiref_outputs.zip" , output_file .name )
Original file line number Diff line number Diff line change @@ -632,20 +632,19 @@ def test_scanpipe_api_project_action_results_download(self):
632632 self .assertEqual (expected , sorted (results .keys ()))
633633
634634 def test_api_project_results_download_symbols_format (self ):
635- project = make_project (name = "SymbolsAPI" )
636635 CodebaseResource .objects .create (
637- project = project ,
636+ project = self . project1 , # Use existing project from setUp
638637 path = "test.js" ,
639638 extra_data = {"source_symbols" : ["func" ]}
640639 )
641-
642- url = reverse ( "project-results-download" , args = [ project . uuid ])
643- response = self .client .get (url , { "output_format" : "symbols" } )
640+ url = reverse ( "project-results-download" , args = [ self . project1 . uuid ])
641+ data = { "output_format" : "symbols" }
642+ response = self .csrf_client .get (url , data = data )
644643
645644 self .assertEqual (200 , response .status_code )
646645 self .assertIn ("application/json" , response ["Content-Type" ])
647646
648- results = json .loads (response .content )
647+ results = json .loads (response .getvalue () )
649648 self .assertIn ("files" , results )
650649 self .assertGreater (len (results ["files" ]), 0 )
651650
You can’t perform that action at this time.
0 commit comments