Skip to content

Instantly share code, notes, and snippets.

@peacing
Created July 28, 2020 02:27
Show Gist options
  • Save peacing/cd479674a80f6ed8b424a74f06646e81 to your computer and use it in GitHub Desktop.
Save peacing/cd479674a80f6ed8b424a74f06646e81 to your computer and use it in GitHub Desktop.
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