def METHOD_NAME(self, pyramid_request):
    exception = ReusedConsumerKey(sentinel.existing_guid, sentinel.new_guid)
    template_data = ExceptionViews(exception, pyramid_request).reused_consumer_key()
    pyramid_request.context.js_config.enable_error_dialog_mode.assert_called_with(
        error_code=JSConfig.ErrorCode.REUSED_CONSUMER_KEY,
        error_details={
            "existing_tool_consumer_instance_guid": sentinel.existing_guid,
            "new_tool_consumer_instance_guid": sentinel.new_guid,
        },
    )
    assert not template_data
    assert pyramid_request.response.status_int == 400