It was reported internally that deepcopy doesn't work on model instances and fails with an infinite recursion exception. The test I'm adding failed without my change.
In doing a deep copy we should only copy the model properties, not the metadata set on the class. All of them are stored in the __dict attribute.
Coverage increased (+0.1%) to 98.343% when pulling 047622a85a91c1e9124cde9ef0ae51a631acf3ca on sjaensch:deepcopy-for-models into 6790a9ab2b8b4ba92dd4c47a9043a37511171c63 on Yelp:master.
It was reported internally that deepcopy doesn't work on model instances and fails with an infinite recursion exception. The test I'm adding failed without my change.
In doing a deep copy we should only copy the model properties, not the metadata set on the class. All of them are stored in the
__dict
attribute.