Closed stphivos closed 8 years ago
In my opinion, this object should be read-only to prevent accidental misusage for products.
You need this feature to make easier to write test code in your product, right?
Then how about adding helper function to patch ObjectMapper
dynamically, like:
def ObjectMapper__setitem__(self, key, value):
self._[key] = value
ObjectMapper.__setitem__ = __setitem__
Yea sounds reasonable. I guess adding it dynamically for testing is not a bad idea, thanks.
Simplifies mocking of itunes receipt for unit testing. E.g.: