Closed beliaev-maksim closed 1 year ago
Patch coverage: 100.00
% and no project coverage change.
Comparison is base (
c25a1c8
) 100.00% compared to head (fd371e5
) 100.00%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Moving unbound_on_send outside of the function will allow users to override the method if they will need to without a need to rewrite the entire start method
Is there a use case for overwriting this method and behavior?
@markstory while working on the bug for moto
I spotted that we always use the same _real_send. However, there might be a use case where we will use unbound_on_send
in a nested responses mock as a real adapter.
then user can intercept real send from a mock (eg in moto) and override it with responses.unbound_on_send
a bit hard to explain. here is more info and examples: https://github.com/getmoto/moto/issues/6417
but generally, it will not hard. Since this produces a cleaner way to handle methods within class and provides more granular control
Moving
unbound_on_send
outside of the function will allow users to override the method if they will need to without a need to rewrite the entirestart
method