bpo-35918: Remove broken has_key method and add test (#11819)

3 files changed