def METHOD_NAME(monkeypatch):
    monkeypatch.setattr(
        pywebauthn,
        "verify_registration_response",
        pretend.raiser(pywebauthn.helpers.exceptions.InvalidRegistrationResponse),
    )
    with pytest.raises(webauthn.RegistrationRejectedError):
        webauthn.verify_registration_response(
            (
                '{"id": "foo", "rawId": "foo", "response": '
                '{"attestationObject": "foo", "clientDataJSON": "bar"}}'
            ),
            b"not_a_real_challenge",
            rp_id="fake_rp_id",
            origin="fake_origin",
        )