Last active
August 13, 2020 17:27
-
-
Save peacing/1ce365ff5f7050bd04f1914109defe00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from lambda_function import * | |
test_kinesis_event = { | |
"Records": [ | |
{ | |
"kinesis": { | |
base64.b64encode(json.dumps({'a': 'dog', 'b': 'cat'})) | |
} | |
}]} | |
test_s3_event = { | |
"Records": [{ | |
"s3": { | |
'bucket': {'name': 'test_bucket'}, | |
'object': { | |
'key': 'example/s3/path/key' | |
} | |
} | |
}]} | |
test_sqs_event = { | |
"Records": [{ | |
"body": json.dumps({ | |
"user_id": "B9B3022F98Fjvjs83AB8/80C185D8", | |
"updated_timstamp": "2020-03-03T00:50:47" | |
}) | |
}]} | |
def test_lambda_handler(): | |
try: | |
response = lambda_handler(event=test_sqs_event, context={}) | |
except Exception as e: | |
print(e) | |
assert True == True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment