Skip to content

Commit

Permalink
🧪 test(handler): replaces example JSON files for a programmatic approach
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiob authored and sladg committed Jan 4, 2023
1 parent 21dccb7 commit 36f2fe9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 394 deletions.
125 changes: 0 additions & 125 deletions example/event-absolute-jfif.json

This file was deleted.

125 changes: 0 additions & 125 deletions example/event-absolute.json

This file was deleted.

125 changes: 0 additions & 125 deletions example/event-s3.json

This file was deleted.

8 changes: 5 additions & 3 deletions imaginex_lambda/handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import os
import shutil
from contextlib import ExitStack
Expand Down Expand Up @@ -122,5 +121,8 @@ def handler(event, context):
if __name__ == '__main__':
print("Running test...")

data = json.load(open('example/event-absolute-jfif.json'))
handler(data, None)
context = {'queryStringParameters':
{'q': '40', 'w': '250',
'url': 'https://s3.eu-central-1.amazonaws.com/fllite-dev-main/'
'business_case_custom_images/sun_valley_2_5f84953fef8c6_63a2668275433.jfif'}}
handler(context, None)
Loading

0 comments on commit 36f2fe9

Please sign in to comment.