Created
August 21, 2017 22:03
-
-
Save d4vsanchez/9a0477020381d6082a16e1d79b7a40ca to your computer and use it in GitHub Desktop.
Fake classes to mock boto3
This file contains hidden or 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
class FakeResource(): | |
def Bucket(self, bucket): | |
return self | |
def put_object(self, Key=None, Body=None, ACL='', Expires='', ContentType=''): | |
# We do nothing here, but return the same data type without data | |
return {} | |
class FakeSession(Session): | |
def resource(self, name): | |
return FakeResource() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment