Skip to content

Commit

Permalink
fix(filters): mimic hit on /finding/open (test)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-l- committed May 21, 2024
1 parent 18bc04b commit f884fb9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions unittests/tools/test_generic_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,3 +650,11 @@ def test_parse_json_invalid_finding(self):
with self.assertRaisesMessage(ValueError,
"Not allowed fields are present: ['invalid_field', 'last_status_update']"):
parser.get_findings(file, Test())

def test_parse_json_bad_date(self):
with open("unittests/scans/generic/generic_bad_date.json") as fdesc:
parser = GenericParser()
findings = parser.get_findings(fdesc, Test())
self.assertEqual(1, len(findings))
# test the filters
self.assertEqual(1, len(Finding.objects.filter(active=True)))

0 comments on commit f884fb9

Please sign in to comment.