diff --git a/integration_tests/test_link_push_subscription.py b/integration_tests/test_link_push_subscription.py index 28197e8..b9adbf1 100644 --- a/integration_tests/test_link_push_subscription.py +++ b/integration_tests/test_link_push_subscription.py @@ -42,8 +42,7 @@ def recent_event_s2_created() -> dict: / "data" / "push-granule-created-s2-n1.json" ) - with data.open() as src: - payload = json.load(src) + payload = json.loads(data.read_text()) # Update relevant parts of message payload to be "recent" # where recent is <30 days from today as we're not currently diff --git a/lambdas/link_fetcher/README.md b/lambdas/link_fetcher/README.md index 6e63ac3..2994a96 100644 --- a/lambdas/link_fetcher/README.md +++ b/lambdas/link_fetcher/README.md @@ -7,7 +7,7 @@ links to downloadable Sentinel products, * Subscriptions API ("event based") We wish to migrate from a polling to an event driven method of link -fetchiung. During the transition period, this subdirectory handles both +fetching. During the transition period, this subdirectory handles both of these methods and deploys them as two separate Lambda functions. This README describes both forms of link fetching. diff --git a/lambdas/link_fetcher/manage_subscription.py b/lambdas/link_fetcher/manage_subscription.py index 62bbdb0..3c0d92d 100644 --- a/lambdas/link_fetcher/manage_subscription.py +++ b/lambdas/link_fetcher/manage_subscription.py @@ -277,7 +277,7 @@ def main( if command == "create": if subscriptions: click.echo( - "Cannot create a second subscriptions (only 1 active is allowed)" + "Cannot create a second subscription (only 1 active is allowed)" ) raise click.Abort() subscription = subscription_api.create_subscription() diff --git a/lambdas/link_fetcher/tests/test_subscription_endpoint.py b/lambdas/link_fetcher/tests/test_subscription_endpoint.py index eb0f24a..6c0f68b 100644 --- a/lambdas/link_fetcher/tests/test_subscription_endpoint.py +++ b/lambdas/link_fetcher/tests/test_subscription_endpoint.py @@ -78,7 +78,7 @@ def event_s2_created() -> dict: def recent_event_s2_created(event_s2_created: dict) -> dict: """A "recent" Sentinel-2 "Created" event from ESA's push subscription - We freezse time + We freeze time """ # freeze to same day as publication date with freeze_time(event_s2_created["value"]["PublicationDate"]):