@@ -1530,14 +1530,18 @@ def test_scanpipe_pipes_d2d_scan_ignored_to_files(self):
15301530 )
15311531 foo_java .update (status = flag .IGNORED_FROM_CONFIG )
15321532
1533+ # Create another file that is already scanned but should not be
1534+ # reverted
1535+ other_scanned = make_resource_file (
1536+ self .project1 , "to/other_scanned.txt" , status = flag .SCANNED
1537+ )
1538+
15331539 d2d .scan_ignored_to_files (self .project1 )
15341540 foo_java .refresh_from_db ()
1541+ other_scanned .refresh_from_db ()
15351542
1536- expected = self .project1 .codebaseresources .filter (
1537- status = flag .IGNORED_FROM_CONFIG
1538- ).count ()
1539-
1540- self .assertEqual (1 , expected )
1543+ self .assertEqual (flag .IGNORED_FROM_CONFIG , foo_java .status )
1544+ self .assertEqual (flag .SCANNED , other_scanned .status )
15411545
15421546 def test_scan_unmapped_to_files (self ):
15431547 to_dir = (
@@ -1558,14 +1562,18 @@ def test_scan_unmapped_to_files(self):
15581562 )
15591563 foo_java .update (status = flag .REQUIRES_REVIEW )
15601564
1565+ # Create another file that is already scanned but should not be
1566+ # reverted
1567+ other_scanned = make_resource_file (
1568+ self .project1 , "to/other_scanned.txt" , status = flag .SCANNED
1569+ )
1570+
15611571 d2d .scan_unmapped_to_files (self .project1 )
15621572 foo_java .refresh_from_db ()
1573+ other_scanned .refresh_from_db ()
15631574
1564- expected = self .project1 .codebaseresources .filter (
1565- status = flag .REQUIRES_REVIEW
1566- ).count ()
1567-
1568- self .assertEqual (1 , expected )
1575+ self .assertEqual (flag .REQUIRES_REVIEW , foo_java .status )
1576+ self .assertEqual (flag .SCANNED , other_scanned .status )
15691577
15701578 def test_flag_deployed_from_resources_with_missing_license (self ):
15711579 from_dir = (
0 commit comments