Closed aogier closed 5 years ago
I'm +1. I think it's pretty clear what that new side_effect def is doing.
The only other thing I can think of doing it mocking the second save with mock.DEFAULT
and just asserting there were two calls to .save()
.
@emlaver what do you reckon?
Checklist
CHANGES.md
|CHANGELOG.md
) or test/build only changesDescription
Fixed a document test mock Fixes #431
Approach
Reimplemented a mock so doc.save() gets called during update_field and not mock construction/evaluation. Tests were passing because
update_field
did not called save() at all, thus making it difficult to spot.Schema & API Changes
Security and Privacy
Testing
test_update_field_success_on_retry
Monitoring and Logging