DEV: Don't leak pretender handlers between tests (PR #11050)

description tbd

GitHub

shall we close this or merge this?