Skip to content

Commit 8ac3c08

Browse files
committed
Removed the duplicate assertion for AWS cloud provider in the test file.
Added test for remediation.
1 parent 68e3c12 commit 8ac3c08

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

unittests/tools/test_prowler_parser.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def test_aws_json_parser(self):
5252
# Verify basic properties that should be present in any finding
5353
self.assertIsNotNone(finding.title)
5454
self.assertIsNotNone(finding.severity)
55-
self.assertIn("aws", [tag.lower() for tag in finding.unsaved_tags])
5655

5756
# Verify cloud provider data
5857
self.assertIn("aws", [tag.lower() for tag in finding.unsaved_tags])
@@ -156,9 +155,12 @@ def test_gcp_json_parser(self):
156155
# Verify cloud provider data
157156
self.assertIn("gcp", [tag.lower() for tag in finding.unsaved_tags])
158157

159-
# Skip resource assertion as GCP JSON test data doesn't include resource information
160-
# Skip remediation check too since GCP JSON test data doesn't include remediation text
161-
# The GCP JSON test data contains empty remediation objects
158+
# Verify remediation data exists in mitigation
159+
self.assertIsNotNone(finding.mitigation, "Mitigation should not be None")
160+
self.assertTrue(
161+
"Remediation:" in finding.mitigation,
162+
"No remediation information found in mitigation",
163+
)
162164

163165
def test_kubernetes_csv_parser(self):
164166
"""Test parsing Kubernetes CSV report with findings"""

0 commit comments

Comments
 (0)