Skip to content

Instantly share code, notes, and snippets.

@peacing
Created July 28, 2020 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peacing/3152315d708c6845afaf4da970210ee5 to your computer and use it in GitHub Desktop.
Save peacing/3152315d708c6845afaf4da970210ee5 to your computer and use it in GitHub Desktop.
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
@pytest.fixture
def s3_test_event():
s3_event = {
'Records': [{
's3': {
'bucket': {'name': 'test_bucket'},
'object': {
'key': 'example/s3/path/key'
}
}
}]
}
return s3_event
@pytest.fixture
def sqs_test_event():
sqs_event = {
"Records": [{
"body": json.dumps({
"user_id": "B9B3022F98Fjvjs83AB8/80C185D8",
"updated_timstamp": "2020-03-03T00:50:47"
})
}]
}
return sqs_event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment