Message355697
Yes, you're right. I do think the docs are a bit misleading.
Maybe something like this would make it more clear?
"If a class is used as a spec then the returned object will be a mock of that class. When the constructor of the returned mock class is invoked an instance object is returned that has the same spec as a normal instance object would have. By passing instance=True you can directly create a mock instance of the class."
If not, feel free to close this issue. |
|
Date |
User |
Action |
Args |
2019-10-30 08:35:30 | Erik Byström | set | recipients:
+ Erik Byström, docs@python, cheryl.sabella, mariocj89, xtreak |
2019-10-30 08:35:30 | Erik Byström | set | messageid: <1572424530.47.0.461248894344.issue30548@roundup.psfhosted.org> |
2019-10-30 08:35:30 | Erik Byström | link | issue30548 messages |
2019-10-30 08:35:30 | Erik Byström | create | |
|