def METHOD_NAME(self, monkeypatch):
    response = HTTPBadRequest()
    @pretend.call_recorder
    def junk_encoding(request):
        raise response
    monkeypatch.setattr(sanity, "junk_encoding", junk_encoding)
    handler = pretend.call_recorder(lambda request: response)
    registry = pretend.stub()
    request = pretend.stub()
    tween = sanity.sanity_tween_factory_ingress(handler, registry)
    assert tween(request) is response
    assert junk_encoding.calls == [pretend.call(request)]
    assert handler.calls == []