Skip to content

Commit

Permalink
fix(parser): make tests more explicit
Browse files Browse the repository at this point in the history
Co-authored-by: Heitor Lessa <heitor.lessa@hotmail.com>
  • Loading branch information
rubenfonseca and heitorlessa authored Jul 14, 2022
1 parent 25e235d commit a7f0562
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/functional/parser/test_sns.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ def test_handle_sns_sqs_trigger_event_json_body(): # noqa: F811


def test_handle_sns_sqs_trigger_event_json_body_missing_signing_cert_url():
# GIVEN an event with a missing SigningCertURL
# GIVEN an event is tampered with a missing SigningCertURL
event_dict = load_event("snsSqsEvent.json")
payload = json.loads(event_dict["Records"][0]["body"])
assert payload.pop("SigningCertURL") is not None
payload.pop("SigningCertURL")
event_dict["Records"][0]["body"] = json.dumps(payload)

# WHEN parsing the payload
Expand All @@ -120,10 +120,10 @@ def test_handle_sns_sqs_trigger_event_json_body_missing_signing_cert_url():


def test_handle_sns_sqs_trigger_event_json_body_missing_unsubscribe_url():
# GIVEN an event with a missing UnsubscribeURL
# GIVEN an event is tampered with a missing UnsubscribeURL
event_dict = load_event("snsSqsEvent.json")
payload = json.loads(event_dict["Records"][0]["body"])
assert payload.pop("UnsubscribeURL") is not None
payload.pop("UnsubscribeURL")
event_dict["Records"][0]["body"] = json.dumps(payload)

# WHEN parsing the payload
Expand Down

0 comments on commit a7f0562

Please sign in to comment.