Skip to content

Instantly share code, notes, and snippets.

@foresmac
Last active August 29, 2015 14:13
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 foresmac/f4eade50b4f5aec0abd9 to your computer and use it in GitHub Desktop.
Save foresmac/f4eade50b4f5aec0abd9 to your computer and use it in GitHub Desktop.
Mock objects for testing
class MockObject(object):
'''Just pass a dict to create test attributes'''
def __init__(self, params):
for key, value in params.items():
setattr(self, key, value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment