Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Maffooch committed May 21, 2024
1 parent b351adc commit e1bfd9a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions unittests/test_import_reimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1449,15 +1449,12 @@ def test_import_reimport_vulnerability_ids(self):
self.assertEqual('CVE-2021-44420', findings[3].vulnerability_ids[1])

def test_import_history_reactivated_and_untouched_findings_do_not_mix(self):
with assertTestImportModelsCreated(self, imports=1, affected_findings=4, created=4):
import0 = self.import_scan_with_params(self.generic_import_1, scan_type=self.scan_type_generic)
test_id = import0['test']
import0 = self.import_scan_with_params(self.generic_import_1, scan_type=self.scan_type_generic)
test_id = import0['test']
# reimport the second report
with assertTestImportModelsCreated(self, reimports=1, affected_findings=4, closed=3, reactivated=1):
self.reimport_scan_with_params(test_id, self.generic_import_2, scan_type=self.scan_type_generic)
self.reimport_scan_with_params(test_id, self.generic_import_2, scan_type=self.scan_type_generic)
# reimport the first report again
with assertTestImportModelsCreated(self, reimports=1, affected_findings=2, closed=1, reactivated=1):
self.reimport_scan_with_params(test_id, self.generic_import_1, scan_type=self.scan_type_generic)
self.reimport_scan_with_params(test_id, self.generic_import_1, scan_type=self.scan_type_generic)
# Passing this test means an exception does not occur


Expand Down

0 comments on commit e1bfd9a

Please sign in to comment.