def METHOD_NAME(self, qtbot, config_stub, key_config_stub):
    """Get a function to display a prompt with a path."""
    config_stub.val.bindings.default = {}
    def _get_prompt_func(path):
        question = usertypes.Question()
        question.title = "test"
        question.default = path
        prompt = promptmod.DownloadFilenamePrompt(question)
        qtbot.add_widget(prompt)
        with qtbot.wait_signal(prompt._file_model.directoryLoaded):
            pass
        assert prompt._lineedit.text() == path
        return prompt
    return _get_prompt_func