Created
July 28, 2020 02:27
-
-
Save peacing/cd479674a80f6ed8b424a74f06646e81 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 * | |
import base64 | |
import json | |
@pytest.fixture | |
def kinesis_test_event(): | |
kinesis_event = { | |
"Records": [ | |
{ | |
"kinesis": { | |
base64.b64encode(json.dumps({'artist': 'Lana Del Rey', 'track': 'Brooklyn Baby'})) | |
} | |
} | |
] | |
} | |
return kinesis_event | |
def test_lambda_handler(kinesis_test_event): | |
try: | |
response = lambda_handler(kinesis_test_event, {}) | |
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