'Get a function to display a prompt with a path.'

@pytest.fixture
def get_prompt(self, qtbot, config_stub):

    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
    config_stub.data = {'ui': {'prompt-filebrowser': 'true'}}
    return _get_prompt_func
