You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why do you think creating a copy is a good idea? It is clearly overhead and not needed in most use cases. If needed, it is easy to create a copy in the body of the function.
e.g.
assertion would fail:
AssertionError: expected call not found. Expected: mock(Currency(currency='HRK')) Actual: mock(Currency(currency='EUR'))
Quick fix: add at the beginning of each consumes/produces:
msg_copy = msg.model_copy()
and use the copy in the rest of the function...
Good fix: add
msg.model_copy()
to the Tester implementationThe text was updated successfully, but these errors were encountered: