Skip to content

Commit

Permalink
lambda returns new file location
Browse files Browse the repository at this point in the history
we need a return value for our step function to consume when it sends emails to staff

*the lambda_handler function returns a dict with the location of the new file - the specifics
 of this may need to change
  • Loading branch information
adamshire123 committed Aug 1, 2023
1 parent bdceac4 commit fbca731
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ mypy = "*"
pylama = {extras = ["all"], version = "*"}
pytest = "*"
moto = {extras = ["s3"], version = "*"}

types-urllib3 = "*"
types-requests = "*"

[requires]
python_version = "3.9"
18 changes: 17 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lambdas/bursar_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,4 @@ def lambda_handler(event: dict, context: object) -> dict: # noqa
f"{target_key.replace('.xml', '.csv')}"
)
logger.info("bursar csv available for download at %s", csv_location)
return {"target_file": csv_location}
1 change: 1 addition & 0 deletions tests/test_bursar_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@ def test_lambda_handler_success(event_data, caplog) -> None:
csv_location = "test-pickup-bucket/exlibris/bursar/test.csv"
response = bursar_transfer.lambda_handler(event_data, {})
assert f"bursar csv available for download at {csv_location}" in caplog.text
assert response == {"target_file": csv_location}

0 comments on commit fbca731

Please sign in to comment.