Skip to content

Instantly share code, notes, and snippets.

@d4vsanchez
Created August 21, 2017 22:03
Show Gist options
  • Save d4vsanchez/9a0477020381d6082a16e1d79b7a40ca to your computer and use it in GitHub Desktop.
Save d4vsanchez/9a0477020381d6082a16e1d79b7a40ca to your computer and use it in GitHub Desktop.
Fake classes to mock boto3
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