File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,9 @@ def test_scanpipe_pipes_flag_flag_ignored_patterns(self):
100
100
project2 , "a.cdx.json.zip-extract/__MACOSX/._a.cdx.json"
101
101
)
102
102
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
+ )
104
106
self .assertEqual (2 , updated )
105
107
ignored_qs = project2 .codebaseresources .status (flag .IGNORED_PATTERN )
106
108
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):
422
422
with mock .patch ("scanpipe.pipes.flag.flag_ignored_patterns" ) as mock_flag :
423
423
mock_flag .return_value = None
424
424
pipeline .flag_ignored_resources ()
425
+
426
+ mock_flag .assert_called_once ()
425
427
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 )
430
430
431
431
def test_scanpipe_pipeline_class_extract_archive (self ):
432
432
project1 = Project .objects .create (name = "Analysis" )
You can’t perform that action at this time.
0 commit comments