Message328647
Calling dir on unittest.mock.Mock will return deleted attributes.
This is a result of the way del is implemented in Mock, which just sets a sentinel in the child mocks, so an AttributeError is raised if the attribute is later accessed.
We can just check for such sentinel in the __dir__ method and not return those. |
|
Date |
User |
Action |
Args |
2018-10-27 10:45:10 | mariocj89 | set | recipients:
+ mariocj89 |
2018-10-27 10:45:10 | mariocj89 | set | messageid: <1540637110.3.0.788709270274.issue35082@psf.upfronthosting.co.za> |
2018-10-27 10:45:10 | mariocj89 | link | issue35082 messages |
2018-10-27 10:45:10 | mariocj89 | create | |
|