Skip to content

Commit f94367e

Browse files
author
sourabh
committed
updating assertion messages
1 parent 446e039 commit f94367e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cloudwatchevents/test/test-guardduty-benchmark.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ def __init__(self, source_category, finding_types, delay):
8787
self.source_category = source_category
8888
self.findings = copy.deepcopy(finding_types)
8989
self.findings.append("CreateSampleFindings")
90-
self.findings.append("Exfiltration:IAMUser/AnomalousBehavior")
9190
print("Initialization complete for SumoLogicResource Object.")
9291

9392
@property
@@ -137,8 +136,7 @@ def assert_logs(self):
137136
assert any((("type" in d and d["type"] == finding_type)
138137
or ("eventName" in d and d["eventName"] == finding_type)) for d in messages)
139138
except AssertionError as e:
140-
self.verificationErrors.append(
141-
"Finding Type \" %s \" not found in the Logs fetched from Sumo Logic." % finding_type)
139+
self.verificationErrors.append(str(e))
142140

143141
def assert_collector(self, collector_id, assertions):
144142
collector_details, etag = self.sumo.collector(collector_id)
@@ -157,9 +155,7 @@ def assertions(self, data, assertions):
157155
try:
158156
assert value == data[key] or value in data[key]
159157
except AssertionError as e:
160-
self.verificationErrors.append(
161-
"Expected Value \" %s \" does not match the current value \" %s \" for the Key "
162-
"as \" %s \"." % (value, data[key], key))
158+
self.verificationErrors.append(str(e))
163159

164160

165161
class CloudFormation(object):

0 commit comments

Comments
 (0)