Last active
August 29, 2015 14:13
-
-
Save foresmac/f4eade50b4f5aec0abd9 to your computer and use it in GitHub Desktop.
Mock objects for testing
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
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