I have a Python mock object and I would like to assert whether any attribute of that object was set.
I do not believe the PropertyMock will work for my purposes, because I must know if any attribute was set, not a particular property.
It also does not appear like I can mock the __setattr__
method of a mock object.
How can I test if any arbitrary attribute of a mock object has been set?