File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,7 +100,9 @@ def test_scanpipe_pipes_flag_flag_ignored_patterns(self):
100100 project2 , "a.cdx.json.zip-extract/__MACOSX/._a.cdx.json"
101101 )
102102 make_resource_file (project2 , "a.cdx.json.zip-extract/a.cdx.json" )
103- updated = flag .flag_ignored_patterns (project2 , flag .DEFAULT_IGNORED_PATTERNS )
103+ updated = flag .flag_ignored_patterns (
104+ project2 .codebaseresources .no_status (), flag .DEFAULT_IGNORED_PATTERNS
105+ )
104106 self .assertEqual (2 , updated )
105107 ignored_qs = project2 .codebaseresources .status (flag .IGNORED_PATTERN )
106108 self .assertEqual (2 , ignored_qs .count ())
Original file line number Diff line number Diff line change @@ -422,11 +422,11 @@ def test_scanpipe_pipeline_class_flag_ignored_resources(self):
422422 with mock .patch ("scanpipe.pipes.flag.flag_ignored_patterns" ) as mock_flag :
423423 mock_flag .return_value = None
424424 pipeline .flag_ignored_resources ()
425+
426+ mock_flag .assert_called_once ()
425427 patterns_args = ["*.ext" , * flag .DEFAULT_IGNORED_PATTERNS ]
426- mock_flag .assert_called_with (
427- codebaseresources = project1 .codebaseresources .no_status (),
428- patterns = patterns_args ,
429- )
428+ self .assertEqual (mock_flag .mock_calls [0 ].kwargs ["patterns" ], patterns_args )
429+ self .assertEqual (mock_flag .mock_calls [0 ].kwargs ["codebaseresources" ].count (), 0 )
430430
431431 def test_scanpipe_pipeline_class_extract_archive (self ):
432432 project1 = Project .objects .create (name = "Analysis" )
You can’t perform that action at this time.
0 commit comments