Created
July 28, 2020 02:20
-
-
Save peacing/3152315d708c6845afaf4da970210ee5 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 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