@@ -644,13 +644,28 @@ def test_scanpipe_pipes_outputs_to_all_formats(self):
644644
645645 self .assertEqual ("asgiref_outputs.zip" , output_file .name )
646646
647- output_file .seek (0 ) # Important for reading from start
648647 with zipfile .ZipFile (output_file , "r" ) as zip_ref :
649648 zip_contents = zip_ref .namelist ()
650649 file_count = len (zip_contents )
651650
652651 expected_file_count = len (output .FORMAT_TO_FUNCTION_MAPPING )
653- self .assertEqual (file_count , expected_file_count )
652+ self .assertEqual (expected_file_count , file_count )
653+
654+ def test_scanpipe_pipes_outputs_to_all_outputs (self ):
655+ fixtures = self .data / "asgiref" / "asgiref-3.3.0_fixtures.json"
656+ call_command ("loaddata" , fixtures , ** {"verbosity" : 0 })
657+ project = Project .objects .get (name = "asgiref" )
658+
659+ with self .assertNumQueries (0 ):
660+ output_file = output .to_all_outputs (project = project )
661+
662+ self .assertEqual ("asgiref_outputs.zip" , output_file .name )
663+
664+ with zipfile .ZipFile (output_file , "r" ) as zip_ref :
665+ zip_contents = zip_ref .namelist ()
666+ file_count = len (zip_contents )
667+
668+ self .assertEqual (len (project .output_root ), file_count )
654669
655670 def test_scanpipe_pipes_outputs_make_unknown_license_object (self ):
656671 licensing = get_licensing ()
0 commit comments